Browser: Chrome 123 / Brave 1.64 OS: Windows 10 / Debian Linux WP: 6.5, 6.4 PHP: 7.4, 8.2 Bricks: 1.9.7.1 Video: Jam
When updating a Bricks site to 1.9.7.1, the Bricks → Settings page would not load for me (white screen). I cloned the site to a local env to debug. By disabling all plugins I could get the Settings page to partially load, however tabs navigation was broken and the Save button missing entirely. Using debug I found the page load was triggering a fatal error: Allowed memory size exhausted. There are almost 5000 users on this website, and it looked to me like a Users query could be the cause of the issue. By commenting out one section of code in the includes/admin/admin-screen-settings.php file I was able to get the settings page to load.
admin-screen-settings.php
(commented out lines 2040-2046 to get the settings page working, but I have no idea if this will negatively impact the code review, I’ll hold off on updating this site until I find out more)
Hi Andrew,
Welcome to the forum, and thanks so much for your report!
What value is your WP memory limit currently set to? You can see the value (and possibly a hint on how to increase the memory limit) in Bricks » System Information.
Increasing the memory limit should actually solve the problem. As stated in the Bricks settings, the recommended limit is 64mb upwards.
Would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?
Client owns the theme license, and I’m not comfortable with sharing admin access to a client production website, albeit temporary. I could spin up a stripped down clone for you on a public dev domain, if that helps?
Came here to report this same thing, so just confirming I’m seeing the same issue as well.
Also confirmed that it’s originating with the get_users() query - there are just too many users in the DB to run this query. (Tried upping the memory all the way to 512M and still exceeded it).
46,000 users for reference.
If I make the query just search admins and editors, it runs without any issue
foreach ( get_users(['role' => ['admin','editor']]) as $user ) {
I’m guessing the approach will need to be to store an inclusive list of users separately, rather than querying every user to determine the “Individual users with code execution capabilities”. Or at least exclude users who don’t have builder access in the first place from the query.
Thanks for reporting the issue.
This has been reported via email by another user and we already got a fix in the next release.
Meanwhile, if you want to use Bricks 1.9.7.1, you can change the code manually in the Bricks theme.
includes/admin/admin-screen-settings.php line 2041 - 2049 replace with these