Mark RauterkusTips

Fixed: Upped WP memory limit. LearnDash Builder broke at Read.SwimISCA.org

2021-12-27 · Status: publish · ISCA

Help. Funky weirdness reported automatically, and the LearnDash Builder is now broken.

The WordPress email is:

[Read.SwimISCA.org] Your Site is Experiencing a Technical Issue

Howdy!Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.In this case, WordPress caught an error with your theme, Thrive Theme Builder.First, visit your website (https://read.swimisca.org/) and check for any visible issues. Next, visit the page where the error was caught (https://read.swimisca.org/wp-admin/post.php?post=5010&action=edit&classic-editor&message=1¤tTab=learndash_course_builder) and check for any visible issues.Please contact your host for assistance with investigating this issue further.If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.https://read.swimisca.org/wp-login.php?action=enter_recovery_mode&rm_token=VNlsq77scJ5xELLYZNq1kA&rm_key=Tsbw8t9Vy66p0z9rV3bf5NTo keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.When seeking help with this issue, you may be asked for some of the following information:WordPress version 5.8.2Current theme: Thrive Theme Builder (version 3.3.2)Current plugin: (version )PHP version 7.4.24Error Details=============An error of type E_ERROR was caused in line 738 of the file /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/themes/thrive-theme/thrive-dashboard/inc/auto-responder/classes/Connection/Mailchimp.php. Error message: Allowed memory size of 299892736 bytes exhausted (tried to allocate 32768 bytes)

First stop was tech support at my Server provider, Pair.com

The error that is at the bottom of the attached e-mail notificationis stating that your MailChimp plugin, mixed with your theme, is attemptingto use more than 286MB of memory, which resulted in an error. You couldattempt to increase PHP memory limits via a .user.ini file, though allowingmore than 286MB of memory per PHP process is a bit excessive. You may wantto reach out to the theme authors and the MailChimp plugin authors to seeif there are settings changes that could be made to those (the theme andthe plugin) which would reduce the memory footprint.

Update: No Mailchimp plugin is working on my site.

Thrive Theme has other API connections, but none with Mailchimp. 

Recent actions.

I did make a back-up recently. 

Then ran Advance Database Cleaner too. I install that. Then uninstall it. So, perhaps the database tables got mashed some way? But, I doubt that.

I have been updating and uploading lessons and topics. Did some changes to a few tags and categories.

I did notice that the editing of lessons and topics in LearnDash seemed to have flipped the default to a place where I can not easily change topic and lesson tags nor categories. But, that might be my fumbles. 

Next up:

Beyond posting to the Facebook groups of LearnDash and ThriveThemes, I'll also submit support tickets to the respective developers.

Tips via Facebook 

Dave Warfel posted:

Definitely submit a ticket with Thrive Themes. This error is coming from your theme. The file is named mailchimp.php, but it's something that Thrive has built into the theme. Another thing you can try is disabling the classic editor. I noticed it in your URL. Since Thrive has its own builder, maybe there's a clash when you try to use the classic editor.

Reply:

So, I think you are talking about the plug in, Classic Editor. I turned that to "Deactivate" -- but the builder is still gone for my biggest course.

The course works still.

The builder for the other, smaller courses still works too.

From LearnDash Tech Support:

Could you please enable debugging mode, Please add the following lines to wp-config.php just before where it says: /* That's all, stop editing! Happy publishing. */define( 'WP_DEBUG', true );define( 'WP_DEBUG_DISPLAY', false );define( 'WP_DEBUG_LOG', true );Then try go to LD Bbuilder.If it fails, a debug.log file should be created inside the wp-content folder, which should contain error information in it, Please share the file with us.

MR also had to turn off the WP_DEBUG so made it from

define('WP_DEBUG', false); 

to:

/** MR changed to comment for LD debug *//** define('WP_DEBUG', false); */

Background from Pair Tech Support

The wp-config.php for Read.SwimISCA.org currently has both the default "define('WP_DEBUG', false)" a couple of lines above your custom "define( 'WP_DEBUG', true )" line. I suspect the initial "false" line ispreventing debug from working.There is currently no debug.log file. When one exists for this site, it would be found at the file path listed below./usr/home/rauterkus/public_html/read.swimisca.org/wp-content/debug.log

Debug File Reads:

[28-Dec-2021 14:40:35 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-wp-walker.php on line 136[28-Dec-2021 14:40:35 UTC] PHP Notice: Trying to get property 'name' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-walker-category-dropdown.php on line 61[28-Dec-2021 14:40:35 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-walker-category-dropdown.php on line 69[28-Dec-2021 14:40:35 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-walker-category-dropdown.php on line 72[28-Dec-2021 14:40:48 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-wp-walker.php on line 136[28-Dec-2021 14:40:48 UTC] PHP Notice: Trying to get property 'name' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-walker-category-dropdown.php on line 61[28-Dec-2021 14:40:48 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-walker-category-dropdown.php on line 69[28-Dec-2021 14:40:48 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/class-walker-category-dropdown.php on line 72[28-Dec-2021 14:40:55 UTC] PHP Notice: register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>ninja-forms-save-progress/v1/saves/(?P<form_id>d+)</code> is missing the required <code>permission_callback</code> argument. For REST API routes that are intended to be public, use <code>__return_true</code> as the permission callback. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/functions.php on line 5663[28-Dec-2021 14:40:58 UTC] PHP Fatal error: Allowed memory size of 299892736 bytes exhausted (tried to allocate 20480 bytes) in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/meta.php on line 1085[28-Dec-2021 14:41:56 UTC] PHP Notice: Trying to access array offset on value of type bool in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/wordfence/lib/wfUtils.php on line 1868[28-Dec-2021 14:41:56 UTC] PHP Notice: Trying to access array offset on value of type bool in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/wordfence/lib/wfUtils.php on line 1871[28-Dec-2021 14:42:05 UTC] PHP Notice: Undefined index: disable_on_pages_posts in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginScriptAssetProvider.php on line 24[28-Dec-2021 14:42:05 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginScriptAssetProvider.php on line 24[28-Dec-2021 14:42:05 UTC] PHP Notice: Undefined index: disable_on_pages_posts in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginStyleAssetProvider.php on line 16[28-Dec-2021 14:42:05 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginStyleAssetProvider.php on line 16[28-Dec-2021 14:42:11 UTC] PHP Notice: Undefined index: disable_on_pages_posts in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginProvider.php on line 16[28-Dec-2021 14:42:11 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginProvider.php on line 16[28-Dec-2021 14:43:35 UTC] PHP Notice: Undefined index: disable_on_pages_posts in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginScriptAssetProvider.php on line 24[28-Dec-2021 14:43:35 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginScriptAssetProvider.php on line 24[28-Dec-2021 14:43:35 UTC] PHP Notice: Undefined index: disable_on_pages_posts in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginStyleAssetProvider.php on line 16[28-Dec-2021 14:43:35 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginStyleAssetProvider.php on line 16[28-Dec-2021 14:43:40 UTC] PHP Notice: Undefined index: disable_on_pages_posts in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginProvider.php on line 16[28-Dec-2021 14:43:40 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/home/rauterkus/public_html/read.swimisca.org/wp-content/plugins/upsell/app/Providers/PluginProvider.php on line 16

== end file ==

Reply from tech support at LearnDash

The log shows:[28-Dec-2021 14:40:58 UTC] PHP Fatal error: Allowed memory size of 299892736 bytes exhausted (tried to allocate 20480 bytes) in /usr/home/rauterkus/public_html/read.swimisca.org/wp-includes/meta.php on line 1085It looks like there are memory issues.Memory problems are cumulative with each plugin and theme contributing to it.You may decide to change the plugin combinations you are using.Such types of problems arise because the PHP Memory Limit of your Host is pretty less than what the process requires for performing it’s functions. In such a case you would need to directly increase the PHP Memory Limit if you’ve access to the PHP.ini file.If you don’t want to mess with the PHP.ini file, then you can go for this method.In this you won’t be needing to create any extra file in your Directory.Just Adding following code in your ‘wp-config.php’ file would increase your PHP Memory Limit to 512 MB.define('WP_MEMORY_LIMIT', '512M');Please note, this setting may not work if your host does not allow for increasing the PHP memory limit--in that event, contact your host to increase the PHP memory limit. Also, note that many hosts set the PHP limit at 8MB.-- end snip --

Reply from server tech support at Pair.

     First, "WP_MEMORY_LIMIT" only controls how much memory WordPress isallowing itself to use, and has nothing to do with PHP memory limits. Ifyou set "WP_MEMORY_LIMIT" to 1GB and the server's PHP memory limit is setto something like 128MB, the "WP_MEMORY_LIMIT" setting has no real effecton you as the server ends the process at 128MB. This setting is only usefulof the PHP memory limit is higher than what you want to allow WordPress touse.        Your wp-config.php file currently already has a "WP_MEMORY_LIMIT"line in it, limiting WordPress to 100MB. You will note your error islisting "299892736 bytes", which is 286MB.        You will want to first delete the "WP_MEMORY_LIMIT" line from your.htaccess file completely.        Next, you will want to edit the .user.ini file in theread.swimisca.org directory to increase the server PHP memory limit beyondthe current 286MB setting that file has in place. You can set it to 512MB,but the server may not actually honor that high of a setting.

MR Did do so far:

File: /.user.ini changed to:

; Wordfence WAFauto_prepend_file = '/usr/home/rauterkus/public_html/read.swimisca.org/wordfence-waf.php'memory_limit = 512Mmax_execution_time = 500max_input_time = 240max_input_vars = 2400; END Wordfence WAF

MR does see:

In file, wp-config.php

define( 'WP_MEMORY_LIMIT', '100M' );

So, what should that be set to? Or, should that line be eliminated fully?

Got this advice from LD Tech Support, just noted, and not doing it as it seems redundant.

Okay If your host doesn't increases memory adding WP_MEMORY_LIMIT in wp-config.php file then follow the steps suggested by your host to increase the memory_limit value in user.ini.But first, I'd check adding the line to wp-config.php file and see if it helps to fix the issue.define('WP_MEMORY_LIMIT', '512M');If it still doesn't works then you can follow the steps suggested by your host.

MR changed the wp-config.php file by removing this line.

define( 'WP_MEMORY_LIMIT', '100M' );

Fixed! The LD Builder is working again for my largest course.

The top of the LD Builder says, 

  • 347 steps in this Course.

I think I should cut the course into different pieces.

Source: helpdesk.WordPress.2026-06-05.xml · Original ID: 3151