• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

WP Toolkit and Bricks builder problem

hech

New Pleskian
Server operating system version
CentOS Linux 7.9.2009
Plesk version and microupdate number
Version 18.0.47 Update #2
Hello!

Recently I started to test Bricks builder - it is Wordpress builder similar to Oxygen or Elementor.
Problem starts after Bricks installation which works like a theme (event it is still not activated) - site appears broken in WP Toolkit but site works normally. I contacted Bricks support and they have no clue what is the problem.

Anyone with the same problem and idea how to fix it?

Thanks!
 
Here is error for broken sample site

Website "/staging.somesite.com" (https://staging.somesite.com): Failed to reset cache for the instance #153: PHP Fatal error: Uncaught Error: Class "Bricks\Elements" not found in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php:21
Stack trace:
#0 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(307): WP_CLI\Runner->{closure}()
#1 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/plugin.php(476): WP_Hook->do_action()
#3 /var/www/vhosts/somesite.com/staging.somesite.com/wp-settings.php(598): do_action()
#4 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1291): require('...')
#5 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1212): WP_CLI\Runner->load_wordpress()
#6 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#7 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#8 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#9 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('...')
#10 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wpt-wp-cli.php(31): require_once('...')
#11 {main}
thrown in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php on line 21
Fatal error: Uncaught Error: Class "Bricks\Elements" not found in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php:21
Stack trace:
#0 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(307): WP_CLI\Runner->{closure}()
#1 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/plugin.php(476): WP_Hook->do_action()
#3 /var/www/vhosts/somesite.com/staging.somesite.com/wp-settings.php(598): do_action()
#4 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1291): require('...')
#5 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1212): WP_CLI\Runner->load_wordpress()
#6 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#7 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#8 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#9 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('...')
#10 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wpt-wp-cli.php(31): require_once('...')
#11 {main}
thrown in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php on line 21
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
 
The problem seems to be quite complex. Do you have an ability to create a ticket for Plesk Support?
 
Here is error for broken sample site

Website "/staging.somesite.com" (https://staging.somesite.com): Failed to reset cache for the instance #153: PHP Fatal error: Uncaught Error: Class "Bricks\Elements" not found in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php:21
Stack trace:
#0 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(307): WP_CLI\Runner->{closure}()
#1 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/plugin.php(476): WP_Hook->do_action()
#3 /var/www/vhosts/somesite.com/staging.somesite.com/wp-settings.php(598): do_action()
#4 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1291): require('...')
#5 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1212): WP_CLI\Runner->load_wordpress()
#6 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#7 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#8 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#9 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('...')
#10 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wpt-wp-cli.php(31): require_once('...')
#11 {main}
thrown in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php on line 21
Fatal error: Uncaught Error: Class "Bricks\Elements" not found in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php:21
Stack trace:
#0 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(307): WP_CLI\Runner->{closure}()
#1 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 /var/www/vhosts/somesite.com/staging.somesite.com/wp-includes/plugin.php(476): WP_Hook->do_action()
#3 /var/www/vhosts/somesite.com/staging.somesite.com/wp-settings.php(598): do_action()
#4 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1291): require('...')
#5 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1212): WP_CLI\Runner->load_wordpress()
#6 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#7 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
#8 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#9 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('...')
#10 /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wpt-wp-cli.php(31): require_once('...')
#11 {main}
thrown in /var/www/vhosts/somesite.com/staging.somesite.com/wp-content/themes/functions.php on line 21
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
It looks like a problem with plugin' (theme) class loading. WPT uses the wp-cli utility to interact with WordPress site features (tune settings, receive info about site / plugins / themes, etc).

Please perform following steps:
1. Enable logging in panel.ini (set log.filter.priority to "7")
2. Open WPT, press "Refresh" button on the WordPress card
3. Open /var/log/plesk/panel.log for viewing
4. Find the stack trace as you mentioned above
5. Several lines above there should be a failed "filemng" call, it looks like this:
Code:
DEBUG [util_exec] [0de390756913ceb6a86f616b3fed642b-0] Starting: filemng user_tfewrtzbgn exec /var/www/vhosts/example.tld timeout 60 /opt/plesk/php/7.4/bin/php -d safe_mode=off -d display_errors=on -d opcache.enable_cli=off -d open_basedir= -d error_reporting=341 -d max_execution_time=60 -c /var/www/vhosts/system/example.tld/etc/php.ini /usr/local/psa/admin/plib/modules/wp-toolkit/vendor/wp-cli/wpt-wp-cli.php --path=/var/www/vhosts/example.tld/ --no-color plugin list --format=json --check-updates=true

The failed filemng call can help you to submit a bug report for plugin' (theme) developers. To properly file the request, you need to prepare the steps to reproduce:
1. Login to the server (SSH) under system user of subscription
2. Download wp-cli from official site WP-CLI | WP-CLI to the subscription home path (e.g. /var/www/vhosts/example.tld/wp-cli.phar)
3. Compose the command to execute wp-cli:
Code:
# choose the same PHP version as set for this domain:
/opt/plesk/php/8.0/bin/php \

# use the same PHP args as in filemng call:
    -d safe_mode=off \
    -d display_errors=on \
    -d opcache.enable_cli=off \
    -d open_basedir= \
    -d error_reporting=341 \
    -d max_execution_time=60 \

# change "example.tld" to your domain name
    -c /var/www/vhosts/system/example.tld/etc/php.ini \

# this is a path to downloaded wp-cli.phar file
    /var/www/vhosts/example.tld/wp-cli.phar \

# set the full path to the root directory of the WordPress site
    --path=/var/www/vhosts/example.tld \

# other wp-cli arguments, especially the operation to perform, in this example this is a command to retrieve a list of installed plugins
    --no-color plugin list --format=json --check-updates=true

So the final command should be like:
Code:
/opt/plesk/php/8.0/bin/php -d safe_mode=off -d display_errors=on -d opcache.enable_cli=off -d open_basedir= -d error_reporting=341 -d max_execution_time=60 -c /var/www/vhosts/system/example.tld/etc/php.ini /var/www/vhosts/example.tld/wp-cli.phar --path=/var/www/vhosts/example.tld --no-color plugin list --format=json --check-updates=true

I'm expecting that execution of this command should fail with the stack trace as you mentioned.
These steps could be reported to the plugin' (theme) developers. wp-cli is a official tool to interact with WordPress sites via CLI and I think that developers are interested to keep support of it with their theme/plugin :)

Note: I've provided an example of wp-cli call to receive plugins list, in your case a command may be different
 
Back
Top