• Resolved kiwiasWP

    (@kiwiaswp)


    Hi Tobias, great plugin.

    I recently updated to TablePress 1.7 (on WP WordPress 4.4.1 running Canvas theme) and for some reason am now getting memory issues when trying to edit all pages in the WP backend. If I have your plugin activated and try to click the Pages -> All Pages link when logged in receive the following message:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /virtual/sportingtours.co.nz/public_html/wp-includes/meta.php on line 833

    I’ve gone through the debug process as you suggest in your sticky post and believe that activating the TablePress plugin is now the only cause of this editing issue.

    With DEBUG turned on I also get the following message on screen:

    Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead.

    Looking at /wp-includes/meta.php I see the following code at line 833:

    // Force subkeys to be array type:
    if ( !isset($cache[$mpid]) || !is_array($cache[$mpid]) )
    $cache[$mpid] = array();
    if ( !isset($cache[$mpid][$mkey]) || !is_array($cache[$mpid][$mkey]) )
    $cache[$mpid][$mkey] = array();

    My thoughts:

    – Could my database be corrupted?
    – Could content submitted to the table press WP table via the interface be causing the memory issues or
    – could it be use of the ‘constructor’ method?

    I’ve tried downgrading the plugin to an old copy (v1.4) but get the same message when trying to access http://www.sportingtours.co.nz/wp-admin/edit.php?post_type=page. I’ve also tried a fresh plugin install but again no joy.

    Any thoughts?

    https://ww.wp.xz.cn/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This error is not actually caused by TablePress, but simply but the combination of plugins, the data they handle, your theme, and other factors on the site.

    The problem is the PHP Memory Limit, which seems to be 64 MB. When a plugin is loaded, it needs memory, which counts towards this limit. Due to the load order, it simply happens that TablePress appears to be the one pushing the server over the limit. If TablePress had a different name (so that the load order would be different), this would simply happen to a different plugin.

    So, the cause is not that WP_Widget issue (which likely is in your theme and should still be fixed to not run into problems in the future), and the database should also be fine.

    To fix, or rather prevent this in the future, please try increasing that PHP memory limit on the server, by increasing the value of the WP_MEMORY_LIMIT constant in the wp-config.php file, e.g. to 512M, via the instructions from https://codex.ww.wp.xz.cn/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
    It could also help to ask your webhost to update to newer version of PHP, like PHP 5.6, as that needs less memory.

    Regards,
    Tobias

    Thread Starter kiwiasWP

    (@kiwiaswp)

    Thanks for the quick reply Tobias.

    I have tried increasing WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT to 512M but no change.

    I’ve also tried using a later version of PHP on the current host by adding AddHandler application/x-httpd-php53, 54 , 55 and 56 but again no change.

    I’ve checked the Canvas theme doesn’t use the ‘constructor’ method too so am at a bit of a loss now!

    I was hoping you might have had this problem reported before and have a quick fix but understand it could be something else altogether as per your response – sadly DEBUG doesn’t help identify what is using that deprecated method. For now I’ll have to keep the plugin deactivated and revert to manual HTML coding for the single table but thanks very much for your speedy reply.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    if it’s not your theme, there’s another plugin that uses the old WP_Widget. I suggest to e.g. use a text editor to search through all files for this string.

    About the memory issue: Does the error message change after adding that constant? Note that some webhosts limit the value, so that you might have to ask your webhost to increase it for you.

    Regards,
    Tobias

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

The topic ‘Plugin upgrade triggers server memory issues’ is closed to new replies.