• stlpl

    (@stlpl)


    User cannot access the admin area due to the error:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in <path>\wp-includes\class-wp-query.php on line 3949

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in <path>\wp-includes\l10n.php on line 207

    Steps to recreate:

    1. Add a user (Subscriber).
    2. Add restriction to the selected page (for “Logged in Users”).
    3. Create a new template via Editor (FSE) for this specific page (select an existing template as a base).
    4. Log in as the user and attempt to access the admin panel.

    Tested on WP 6.7 (PHP 8.1) & 6.8 (PHP 8.2).

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter stlpl

    (@stlpl)

    To clarify, I’m blocking access for logged out users to the selected page.

    Plugin Support Jamie P.

    (@jamiepineda)

    Hi @stlpl

    Thanks for your patience.

    We’re sorry to hear about the errors you encountered.

    Could you let us know if you see any errors in the Log Viewer (under Content Control → Settings → General)?

    Also, are you running into any PHP errors, and do you happen to be using a translation plugin?

    Please submit a support ticket with all the relevant details using our Support Request – Content Control form so we can investigate.

    We look forward to your reply.

    Thread Starter stlpl

    (@stlpl)

    Thank you for your reply, all the necessary information can be found here.

    In the “Log Viewer” section there are no errors at all.

    I reproduced the error on a clean installation of WordPress in English with only the “Content Control” plugin.

    After additional testing, when the user tries to open the panel, the following errors also appear alternately:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 12288 bytes) in <path>\wp-includes\functions.php on line 656
    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in <path>\wp-includes\block-template-utils.php on line 218
    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in <path>\wp-includes\class-wp-block-parser.php on line 330

    It also seems that adding other restrictions (e.g., to the homepage) also causes an error. The template prepared from within the editor (FSE) for specific page/post are crucial here, not the page/post itself.

    Plugin Support Jamie P.

    (@jamiepineda)

    Hi @stlpl

    Thanks for the info.

    Could you try the following to isolate the issue:

    • Increase your PHP memory limit.
    • Remove the custom template from the restricted page and switch it back to the default template.
    • Try restricting a page without assigning a custom template and see if the error persists.

    This will help confirm whether the issue only happens when custom templates are involved. 

    We look forward to your reply.

    Thread Starter stlpl

    (@stlpl)

    Increasing my PHP memory does not help.

    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 12288 bytes) in <path>\wp-includes\functions.php on line 656

    The error occurs only when I create a template (even an empty one) for a specific page or post. I don’t need to block access to that particular page or post – blocking the archive or the homepage also causes the error. The issue disappears once the custom template is removed.

    I ran the tests using Twenty Twenty-Five theme.

    Plugin Support Jamie P.

    (@jamiepineda)

    Hi @stlpl

    Thanks for your reply.

    We’ve forwarded this to our developers so they can take a look.

    Feel free to let us know if you have more information related to the bug.

    We appreciate your patience! 🙏

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

You must be logged in to reply to this topic.