• Resolved dynamikspeed

    (@dynamikspeed)


    Thanks for the great plugin. I found an issue saving my table recently.
    I get the below error:
    Saving failed: AJAX call failed: error – . Try again while holding down the “Shift” key.

    I have traced this to 2 rows in the table which have the following linux code displayed using a code display plugin.

    Ubuntu version on Mint

    cat /etc/upstream-release/lsb-release

    Linux Mint version

    cat /etc/issue

    When i remove these 2 rows the table saves successfully. This started happening recently. Before i could save the table with this code in there. Do you know why this is breaking the table and how I can display this code in the table and save it successfully?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The cause for this is a firewall/security software (something like “mod_security” or similar) that is installed on the server. Essentially, that security software falsely thinks that a hacking attack is going on, when it detects those Linux commands as part of the browser/server communication.
    Therefore, that software then blocks the request, so that TablePress never actually gets the table data from the browser and then issues the error message.

    To fix this, you will need to contact your webhost company’s support team and ask them to relax the configuration of that security software, so that it allows these commands as part of the communication.
    There’s nothing that can be done about this in TablePress or WordPress, as both don’t in any way filter the table content.

    Regards,
    Tobias

    I had the same issue here – mod_security is indeed in my case the culprit, it blocked the process.
    But just doing as said “holding shift and clicking save” did it for me and everything was saved… Can you tell me, what the “shift” key is changing and is it a “nice workaround” or should I define an exception in mod_security?
    Thanks so much

    Mathias

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Mathias,

    thanks for your feedback on this!

    It’s interesting that the “Shift” key saving method worked here. I don’t really have an explanation for that. The only difference would be that the save request is not done via AJAX (to the admin-ajax.php) file, but as a normal page HTTP POST request to the admin-post.php file.

    Regards,
    Tobias

    Thread Starter dynamikspeed

    (@dynamikspeed)

    Thanks for the explanation. When i press shift and save it still fails for me.
    I will either remove the commands from the table or discuss this with my Web host.
    Do you know if i disable mod_security will this cause me security problems or is it safe to disable?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    I would recommend that you discuss this with your webhost. Maybe it’s sufficient to configure mod_security differently, i.e. to relax on particular rule/check, instead of deactivating it all. Even if you did that, you would not run into immediate security problems, but you would give up some extra protection.

    Regards,
    Tobias

    Thanks for your fast reply Tobias!
    I realized that also with the “shift” key the upload is not always working – depending on the table, that I tried to upload / edit.
    It’s definetly the fault of modsecurity and I simply made an exception now for Tablepress and everything is working really great.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

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

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Linux code in table prevents saving table: Saving failed: AJAX call failed’ is closed to new replies.