• Resolved Jaya

    (@moyajaya)


    First; I’d like to thank you, Tobias, so much for your effort in maintaining this amazing plugin and offering such a huge work for free!

    Second, The title of the post explains it all, let me illustrate a little.

    I use this plugin to maintain a guide with many tables that contain pictures. All those pictures’ links were correct until a recent change to the directory those pictures are hosted on. Of course i can’t change their placement now or i’ll mess up many other things in the site. so I thought i’d export the *.dump file and replace all the links at once using notepad++. The file opened correctly and replacing all links was very easy and everything seemed alright until i tried to import the new*.dump file to the site(of course i have a backup and I am aware of the warning.. just in case) but I thought it wouldn’t harm to try. The warning is indeed accurate and i got the “The uploaded dump file is empty. Please upload a valid dump file.” error.

    My question is: Is there a way to edit the *.dump file without harming its integrity? is there a software that would permit me to edit it without destroying it?

    I’d highly appreciate your input into this. Thank you in advance!

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

    (@tobiasbg)

    Hi,

    thanks for your comment.

    No, unfortunately, there is no possibility to manually edit the Dump File, that I’m aware of.

    The problem with editing the file is, that the used PHP function (serialize()) that writes an array as a string stores the length of the array elements in the string, so that the string can later be restored to an array.

    Now, when you edit (by searching and replacing) content (like links) in that file, the length information for the individual cells do no longer match the actual length. That breaks the import (as you have noticed), because PHP’s unserialize() can not get the correct array from the string.

    Basically, this is the same as if you edit the table directly in the place where it is stored in the database. That will also break the table and is not recommended or supported.

    The only chance I see: Export your individual tables as CSV files and do the replacing there (that will work, because CSV files don’t save length information). Then, re-import that file.
    I’m well aware, that this is quite tedious with many tables, but unfortunately it’s the only real alternative…

    Best wishes,
    Tobias

    Thread Starter Jaya

    (@moyajaya)

    Thank you for the quick response. Can’t thank you enough for that!

    I will take your advise and export each one of the tables as you mentioned.

    I’ve marked this topic as solved.

    By the way, I love the live search filtering that shows results as you type! I’d love to see a global search that does the same thing but looks and gives results from all of the tables in one place. a pop up maybe?

    Thank you again!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    unfortunately a global search is not really possible. You might hack something together with custom JavaScript, but I don’t really have an idea on how to tackle that. In any case, the entire table would be necessary on the page.
    However (as I have not written the live search feature), I need to refer you to the site of the DataTables JavaScript library (which does the searching) for more: https://www.datatables.net

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Any possibility to edit the exported dump file?’ is closed to new replies.