WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] JSON_ERROR_SYNTAX (10 posts)

  1. Mike McNamara
    Member
    Posted 1 year ago #

    Just replaced previous WP-Table Reloaded with Table Press.

    Have created a table and when came to Preview received error message saying table was corrupted. so do not have a URL to give with sample.

    Having carried out diagnositcs it seems that this error only occurs when I have added a link via the advanced editor to cell content. After saving table and go back to table press entry see the following error.

    [ERROR] TABLE IS CORRUPTED (JSON_ERROR_SYNTAX)! DO NOT EDIT THIS TABLE NOW!

    Have uninstalled Plugin and reinstalled, but same error occurs. Have tried to understand if there is a database file that could be corrupted?

    Any suggestions?

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Mike,

    thanks for your post, and sorry for the trouble.

    The reason for this problem most likely is another plugin that is interfering with the saving process of tables. Specifically, it messes with the quotation marks " in the HTML code for a link. This then breaks the internal data format that TablePress uses for the tables (JSON), so that the table gets corrupted.

    In the past, this problem has for example been caused by the plugin "Outbound Link Manager". Are you maybe using that plugin?
    If so, please deactivate it and try creating and editing a new table (with a link in it) again.

    If you are not using that plugin, I can offer to take a direct look at your site's admin area, to maybe find the plugin that is causing this. In order for me to do that, please send me an email with the account information for a temporary admin account. You can find my email address in the main plugin file "tablepress.php".

    Regards,
    Tobias

  3. Mike McNamara
    Member
    Posted 1 year ago #

    Hi Tobias,

    Did some diagnostics late today and have solved the problem.

    It was a plug in called Contact Form 7 (http://wordpress.org/extend/plugins/contact-form-7/)

    Very strange as have used this since day one and found no problems with it. But as I have moved to another 'Form' Plug in on my other two installs I replaced Form 7 with a new one and reran some more tests and all seems to be in order now.

    Interestingly, another symptom of the problem was that no 'returns' were being put into the lines of text in the tables showing up as a letter n as per ... '1 row of text with a CRnto the next line.'

    Anyway, all solved now so can get on with table generation.

    Kind regards

    Mike

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Mike,

    thanks for this information!
    It's indeed strange that Contact Form 7 seems to be causing this on your site... From what I know, it's a very well written plugin, and I can't really believe that it would contain such a problem. I just checked the code briefly, and there are a few calls to the responsible PHP function in it, but I can't find one right now that manipulates the table data... But if deactivating Contact Form 7 fixes the issue for you, things are clear...

    About the "returns" (or line breaks) showing up as just the letter "n": This is indeed directly connected. The background of this issue is, that quotation marks " and line breaks are internally stored as \" and \n respectively, with \ to "escape" the characters as control sequences. Then, the plugin that causes the trouble, usually contains a call to the PHP function "stripslashes()", which will remove all \ from the internal format of the table. That leaves line breaks as n and breaks all tables with a quotation mark, as the internal format can then not be transformed back into a readable table (actually a two-dimensional array).

    Regards,
    Tobias

  5. thierrym59
    Member
    Posted 1 year ago #

    Hi Tobias,

    I also replaced WP-Table Reloaded with Table Press a few months ago.
    I have several tables on my site, and one of them got a JSON_ERROR_SYNTAX message this morning.

    [ERROR] TABLE IS CORRUPTED (JSON_ERROR_SYNTAX)! DO NOT EDIT THIS TABLE NOW!

    http://lamusiqueasontop.com/?page_id=2408

    The table is called : (Notes 20-15)
    It's "hidden" under "Montrer / Cacher le tableau" -> You just have to clink on these words to get it.

    I don't understand this "error" because the other tables are ok.

    (Sorry my English is so poor :-( )

    Regards,
    Thierry

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Thierry,

    thanks for your post, and sorry that you are also affected by this problem!

    To find out more, please also follow my suggestions in the first reply above, to find the plugin that is causing this in your case.

    Regards,
    Tobias

  7. thierrym59
    Member
    Posted 1 year ago #

    Hi Tobias,

    Thanks a lot for your answer.
    I don't think there is a "plug-in" problem.

    It occurred at the same time of an "internal" problem for my domain provider (mavenhosting). The internal clock got crazy (we were back to 1970) and I coudn't access the administration board for almost 48 hours. All the data (articles, tables, ...) I worked on just before the problem got ... "erased". So I lost days of work (not just the data i had just fed in but the whole table) :-(
    The administration board and the website are now bacn on line.

    Regards,

    Thierry

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Thierry,

    Sorry for the late answer. As I was on vacation, I didn't have a chance to reply earlier.

    Ok, I see. So just to clarify. TablePress now works again, and you can edit tables just fine?

    Regards,
    Tobias

  9. Mike McNamara
    Member
    Posted 11 months ago #

    Sorry for the late reply.

    All now sorted.

  10. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Mike,

    awesome! That's great to hear!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags