• Resolved Antal Tettinger

    (@antaltettinger)


    Hello! We are keep having this error in our error log and it might be related to some more serious problems, I wonder if you could please give some feedback what could we do to stop this from happening? We are using TablePress and TablePres Single Cell shortcodes, usually it works well but one of our tables broke a couple of times recently.

    Thank you for your help in advance!

    This is the error that wer are having in our logs:

    [26-Apr-2020 21:14:05 UTC] PHP Fatal error: Uncaught Error: Call to a member function load() on null in /home/website/public_html/wp-content/plugins/tablepress-single-cell-shortcode/tablepress-single-cell-shortcode.php:33
    Stack trace:
    #0 /home/website/public_html/wp-includes/shortcodes.php(343): tablepress_table_cell_shortcode(Array, ”, ‘table-cell’)
    #1 [internal function]: do_shortcode_tag(Array)
    #2 /home/website/public_html/wp-includes/shortcodes.php(218): preg_replace_callback(‘/\\[(\\[?)(table\\…’, ‘do_shortcode_ta…’, ‘\n<table>\n<tr>\n<…’)
    #3 /home/website/public_html/wp-content/plugins/shortcodes-ultimate/includes/shortcodes/tabs.php(205): do_shortcode(‘\n<table>\n<tr>\n<…’)
    #4 /home/website/public_html/wp-includes/shortcodes.php(343): su_shortcode_tab(Array, ‘\n<table>\n<tr>\n<…’, ‘su_tab’)
    #5 [internal function]: do_shortcode_tag(Array)
    #6 /home/website/public_html/wp-includes/shortcodes.php(218): preg_replace_callback(‘/\\[(\\[?)(table\\…’, ‘do_shortcode_ta…’, ‘[su_tab title=”…’)
    #7 /home/website/public_html/wp-content/ in /home/website/public_html/wp-content/plugins/tablepress-single-cell-shortcode/tablepress-single-cell-shortcode.php on line 33

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m not really sure what’s going on there. It looks like the TablePress Single Cell Shortcode is embedded inside an HTML table, which is again embedded in some sort of tab (from the Shortcodes Ultimate plugin?).
    Can you maybe try this step by step, reducing complexity and nesting here? Does the Single Cell Shortcode Extension work in normal posts/pages?

    Regards,
    Tobias

    Thread Starter Antal Tettinger

    (@antaltettinger)

    Hello Tobias! Thank you for your feedback.

    Do you think that something like this could be responsible for this?

    https://pasteboard.co/J6WZgmh.png

    Is it bad that cells have single cell shortcodes that refer to another cell in another table? I couldn’t find more nesting than that at the moment.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no, this is fine. It’s probably not the most efficient solution though. But it definitely should not cause this problem…

    What’s weird is the #3 and #4 part from above. To me, this looks like there’s another HTML table somewhere somehow, in which the Shortcodes Ultimate plugin is looking for tabs.

    Regards,
    Tobias

    Thread Starter Antal Tettinger

    (@antaltettinger)

    Hello Tobias!

    Maybe this one?
    https://pasteboard.co/J6XwrkH.png

    It seems inside some shortcodes the Single Table Cell shortcodes are being executed? But the table displays correctly.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, this looks more like it! Nice find!
    My guess is that somehow that Shortcode is evaluated at a time when TablePress is not yet fully loaded.

    Now, are you actually seeing this error message on screen (you might have to set WP_DEBUG to true in your site’s wp-config.php file)? And is that table in the tabs working properly?

    What happens if you put this table outside of the tabs? Do you still get the error?

    Regards,
    Tobias

    Thread Starter Antal Tettinger

    (@antaltettinger)

    Hello Tobias! Thanks for all your feedback. These errors show up on our error logs, the WP_DEBUG is set to false but we have an auto-generated error log. I suspect when somebody visits a page where there is an embedded code like what you’ve mentioned it causes a PHP error. But I am not sure which page is it, after visiting the page that has the above mentioned code the error log didn’t update, so maybe that is not the one causing this. Do you have any suggestions how to track down where is the table that is causing the error based on the error log?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    not really, sorry 🙁

    The code that you posted seems to be related to the stack trace that you posted, so I would recommend to continue investigating that. For example, is the error appearing in the error log file repeatedly, and also still now?

    Regards,
    Tobias

    Thread Starter Antal Tettinger

    (@antaltettinger)

    Hello Tobias! No worries and thank you! I am pretty sure there is some over-nesting involved here but I don’t think that particular one I have checked is the one that causes the break. And yes this error regularly appears, I suppose when someone hits a page which triggers the error, but I couldn’t find out which one. I really appreciate your help and helping to pinpoint the issue about over-nesting shortcodes, I will keep checking the error logs and try to find out where is the table which is causing it.

    Just one more question please is there some character that we should avoid from adding to your tables? One of the tables kept crashing apparently for no reason, I don’t know if this was related to the nesting issue or having some character that we shouldn’t.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ok 🙂 I don’t think that there can be “over-nesting”, it’s more of a problem of load order most likely.

    For the new question: What do you mean with “crashing” here?
    Are you talking about “corruption”? If so, quotation marks are likely involved with that, but corruption should never happen! (So, what I’m saying: The goal is that all characters should always work 🙂 ).

    Regards,
    Tobias

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

The topic ‘PHP fatal error’ is closed to new replies.