• Resolved Rich

    (@rremick)


    Hi, is there a way to import the tables while keeping the id number the same. I deleted some tables over the years and the id of the original table are now out of sync when i import them to a new website.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    What do you mean with “out of sync” here? Do you mean that intermediate table IDs are missing?

    Note that you can change the table ID when editing a table.

    Importing with keeping a table ID (which would have to be part of the imported file) is only possible with the JSON format. The other formats, like CSV, Excel, or HTML, simply don’t have a way to store that in the respective file.

    Regards,
    Tobias

    Thread Starter Rich

    (@rremick)

    Where can i look up how to do the json method? I would like to ids to match. Once i deleted a few tables the id of the table and the import id dont match when i import them.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    To see what the JSON format looks like, just export one of your tables to a JSON file and inspect that in a normal text editor, like Notepad on Windows or Text Edit on Mac.

    Now, I’m still a bit confused here: Where exactly do the table IDs not match? What are you comparing the table ID that is assigned to an imported table to? To the ID that a table has on an old/different site?

    Regards,
    Tobias

    Thread Starter Rich

    (@rremick)

    Yes,
    In other words the NEW id number of the table imported does not always match the id of the table that was exported

    The table IDs are not always consecutive because some tables where deleted.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, so this is about a mismatch between exported and imported table IDs.
    To get around that, you will need to use the JSON format when exporting. That way, the table ID will be part of the exported data. When you then import that .json file (on the same or a different site), the table ID will be extracted from the data and it will be used for the imported table, if it’s not yet in use.

    Regards,
    Tobias

    Thread Starter Rich

    (@rremick)

    Ok, that worked perfect! Thank you!

    Just one odd thing i noticed, the imported tables no longer fill the width of the screen, but maybe 2/3 or 3/4 or so.

    Like it thinks there is a sidebar when there isnt. I can email you screen shots. The article is not published yet so i cant send the url.

    I hope that makes sense

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    good to hear that this helped!

    These widths problems are unrelated to the export/import of the table. Instead, they are likely related to the theme on the new site.

    It could indeed be possible that the pages into which you embedded the table use a “Page Template” with an (empty) sidebar. You should then be able to choose a different “Page Template”, like “Full width” or “No sidebar” on the “Edit” screen of the page.

    Another possible cause could be a JavaScript problem. To fix that, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress {
      width: 100% !important;
    }

    Regards,
    Tobias

    Thread Starter Rich

    (@rremick)

    Thank you for your assistance Tobias!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ??

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘import table ID’ is closed to new replies.