Support

Account

Home Forums Backend Issues (wp-admin) Fatal error: Maximum function nesting level reached

Solving

Fatal error: Maximum function nesting level reached

    • Elliott

    • October 19, 2018 at 6:47 pm

    Hi community,

    I am having a serious issue where I can no longer access the ACF Field Groups, and thus cannot add/edit field groups.

    When I attempt to access this area, I get the following warning:
    `
    Fatal error: Maximum function nesting level of ‘256’ reached, aborting! in /app/public/wp-includes/plugin.php on line 176
    `

    I am running WordPress 4.9.8 and ACF 5.7.7.

    I have tried many different solutions, which have not worked. These include:

    • Updated xdebug nesting value via php.ini
    • Updated xdebug nesting value via PHP
    • Disabled all plugins (except ACF)

    I would very much appreciate any support on this!

    Thank you

  • I had a similar “Maximum function nesting level of ‘200’ reached” issue this AM when updating a site using WP 5.0.3 to version 5.7.12.

    This site imports a number of ACF Pro fields via JSON, and I’m working to localize the issue further.

    I reverted to previous versions of ACF Pro and the problem seems to introduced in the 5.7.11 release. The problem resolves if I rollback the version to 5.7.10.

    The traceback of the error log hit the following before the page failed to render. Both Pages and AJAX Requests that use ACF fields via the WP API were failing to render.

    We use ACF Pro pretty heavily – is there a particular case where the acf/validate_setting filter might be hitting recursively when the page loads?

    `
    #0 {acf-pro-path}/includes/api/api-helpers.php(145): apply_filters(‘acf/validate_se…’, ‘export_textdoma…’)
    #1 {acf-pro-path}/includes/api/api-helpers.php(165): acf_validate_setting(‘export_textdoma…’)
    #2 {acf-pro-path}/includes/deprecated.php(78): acf_get_setting(‘export_textdoma…’, ”)
    #3 {wp-path}/wp-includes/class-wp-hook.php(286): acf_deprecated->acf_settings_l10n_textdomain(”)
    #4 {wp-path}/wp-includes/plugin.php(203): WP_Hook->apply_filters(”, Array)
    #5 Error while reading response header from upstream.
    2019/02/20 19:19:38 [error] 1352#1352: *4123 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Maximum function nesting level of ‘200’ reached, aborting! in {wp-path}/wp-includes/plugin.php:176
    `

  • @nickxd It looks like we are having exactly the same issue. Did you find a solution for this?

  • Not sure if this will help you but it appears to be a PHP extension may be causing the issue and not PHP. PHP has no limits on nested function calls. I found this https://stackoverflow.com/questions/8656089/solution-for-fatal-error-maximum-function-nesting-level-of-100-reached-abor

  • @hube2 That is correct, however, if I turn XDebug off, I get an out of memory error, because of the too many nested function calls, so that won’t fix the real issue we’re having.

  • What is your memory limit?

  • @hube2 Our memory limit is 512 MB, it really is exactly the same issue as @nickxd is/was having. Something inside ACF is causing an infinite loop, and with that it surpasses the memory limit. Even cranking up the limit to 1024 MB or more is not the solution.

  • I’m not seeing this issue at all the latest version of ACF. You say that you can’t access field groups.

    Does the group list page load?

    Are you having issues editing all field groups or just some?

    What is in the field groups that are giving you problems?

  • @hube2 It seems to only be a problem when already having lot’s of large field groups that are being loaded with acf-json (local). Even displaying some groups (in this case on an options page) gives issues.

  • I’m going to need more information on the JSON files that are causing the issues.

    This is what I would do to narrow it down. Download a copy of all of the JSON files. Delete all of the JSON files from the server – does this clear up the issue? If it does then narrow down what JSON file or combination of files is causing the issue.

  • To answer your question, Marco, at last check we were still having the issue but only on one of our sites – we have frozen the ACF version and haven’t had a chance to test again with the latest release, I will try devoting some more troubleshooting time this week or early next week.

    This site also has our largest number of JSON files (Another site has nearly as many but not quite as many), and we do some filtering of field configuration after loading these via JSON using ACF hooks. We use these JSON files pretty deeply in our workflow in a custom plugin, so we’ll give this a test but we’re talking about 30 – 40 required by the theme so this will take us a while to test to narrow things down. We use two add-ons typically as well, and we haven’t been able to localize if it’s an issue with those fields in particular:

    Advanced Taxonomy Selector: https://wordpress.org/plugins/acf-advanced-taxonomy-selector/
    Image Crop Add-On: https://wordpress.org/plugins/acf-image-crop-add-on/

    We’re on Vagrant servers in developemnt where we have control over a range of PHP configuration options – we’ve tried increasing server and PHP memory limits, max number of variables limits, all with no luck.

  • An Update to this issue – As of ACF Pro 5.8.2, this issue appears to be resolved.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.