Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When setting define( 'QM_ENABLE_CAPS_PANEL', true ), an error occurs #937

Open
z-sq opened this issue Dec 21, 2024 · 3 comments
Open

When setting define( 'QM_ENABLE_CAPS_PANEL', true ), an error occurs #937

z-sq opened this issue Dec 21, 2024 · 3 comments

Comments

@z-sq
Copy link

z-sq commented Dec 21, 2024

When setting

// wp-config.php
define( 'WP_DEBUG', true );
define( 'QM_ENABLE_CAPS_PANEL', true );

Error message

PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 523
@crstauf
Copy link
Contributor

crstauf commented Dec 21, 2024

This is the primary reason why the Capabilities panel is hidden behind a constant: it requires a lot of memory that not every server will be able to support.

@johnbillion
Copy link
Owner

Yeah to be honest there isn't anything I can do about this at the moment. The memory consumption directly correlates to the number of capability checks, and on some sites that can quickly run into the hundreds.

@z-sq
Copy link
Author

z-sq commented Dec 22, 2024

I see,Thank you for your answer. When I set define( 'WP_DEBUG', false ); no exceptions appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants