SOLVED: WooCommerce version 9.6.0 blocks Bricks Builder from loading

Browser: All of them
OS: Windows 11

I updated the WooCommerce plugin to 9.6.0 and now Bricks Builder doesn’t want to load. When I dissable WooCommerce Bricks Builder loads again.

Had exactly the same problem. The next day the problem was gone w/o any additional activity. Does WooCommerce run some cronjobs overnight?

Hi Erwin,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue - and I have already updated various installations.
Are there any errors in the console or the PHP error logs?

Have you tried switching to another theme for a minute and then back to Bricks?

Best regards,
timmse

Hey timmse, I experience the same issue atm (even when using a rollback to Woocommerce 9.5.2).

This is my debug-log part for this: [22-Jan-2025 18:29:38 UTC] PHP Fatal error: Uncaught TypeError: preg_match(): A - Pastebin.com

Hallo timmse,

I test on InstaWP. So it’s not on a live site. When I rollback to WooCommerce 9.5.2 it works again. Just updated again to 9.6.0 and I got the same problem. The last two entry’s in the error log:

[Wed Jan 22 19:32:25.061513 2025] [proxy_fcgi:error] [pid 2145333:tid 140228920596224] [client 62.45.115.226:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, bool given in /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:314\nStack trace:\n#0 /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/woocommerce/src/Blocks/AssetsController.php(314): preg_match()\n#1 /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/woocommerce/src/Blocks/AssetsController.php(297): Automattic\WooCommerce\Blocks\AssetsController->get_absolute_url()\n#2 [internal function]: Automattic\WooCommerce\Blocks\AssetsController->Automattic\WooCommerce\Blocks\{closure}()\n#3 /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/woocommerce/src/Blocks/AssetsController.php(302): array_reduce()\n#4 /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/woocommerce/src/Blocks/AssetsController.php(298): Au…’, referer: Login ‹ CartridgeCity.nl — WordPress

[Wed Jan 22 19:32:25.061116 2025] [proxy_fcgi:error] [pid 2145333:tid 140228920596224] [client 62.45.115.226:0] AH01071: Got error ‘PHP message: PHP Warning: Undefined array key “file” in /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/query-monitor/collectors/php_errors.php on line 388PHP message: PHP Warning: Undefined array key “line” in /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/query-monitor/collectors/php_errors.php on line 388PHP message: PHP Warning: Undefined array key “file” in /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/query-monitor/collectors/php_errors.php on line 388PHP message: PHP Warning: Undefined array key “line” in /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/query-monitor/collectors/php_errors.php on line 388’, referer: Login ‹ CartridgeCity.nl — WordPress

Query Monitor gives me the following error:

Fatal error: Uncaught Error: preg_match(): Argument #2 ($subject) must be of type string, bool given
in /home/mubokuguku0258/web/cartridgecity.instawp.xyz/public_html/wp-content/plugins/woocommerce/src/Blocks/AssetsController.php on line 314

Call stack:

  1. preg_match()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:314
  2. Automattic\W\B\AssetsController::get_absolute_url()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:297
  3. Automattic\W\B\AssetsController::Automattic\W\B\{closure}()
  4. array_reduce()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:302
  5. Automattic\W\B\AssetsController::get_script_dependency_src_array()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:298
  6. Automattic\W\B\AssetsController::Automattic\W\B\{closure}()
  7. array_reduce()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:302
  8. Automattic\W\B\AssetsController::get_script_dependency_src_array()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:267
  9. Automattic\W\B\AssetsController::get_block_asset_resource_hints()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:168
  10. Automattic\W\B\AssetsController::get_prefetch_resource_hints()
    wp-content/plugins/woocommerce/src/Blocks/AssetsController.php:133
  11. Automattic\W\B\AssetsController::add_resource_hints()
    wp-includes/class-wp-hook.php:324
  12. WP_Hook::apply_filters()
    wp-includes/plugin.php:205
  13. apply_filters()
    wp-includes/general-template.php:3521
  14. wp_resource_hints()
    wp-includes/class-wp-hook.php:324
  15. WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:348
  16. WP_Hook::do_action()
    wp-includes/plugin.php:517
  17. do_action()
    wp-includes/general-template.php:3064
  18. wp_head()
    wp-content/themes/bricks/header.php:7
  19. require_once('/home/mubokuguku0258...es/bricks/header.php')
    wp-includes/template.php:810
  20. load_template()
    wp-includes/template.php:745
  21. locate_template()
    wp-includes/general-template.php:48
  22. get_header()
    wp-content/themes/bricks/template-parts/builder.php:2
  23. include('/home/mubokuguku0258...te-parts/builder.php')
    wp-includes/template-loader.php:106
  24. require_once('/home/mubokuguku0258.../template-loader.php')
    wp-blog-header.php:19
  25. require('/home/mubokuguku0258...l/wp-blog-header.php')
    index.php:17

The only plugins active are WooCommerce and Query Monitor. And even with Query Monitor disabled It gives the same errors. Only Bricks Theme is installed. The PHP version is 8.0

Yes, I also faced it today after updating WooCommerce. Even for a few minutes the builder would not load at all. After enabling debugging I faced the above errors. Of course I faced this problem with bricks 1.12 Beta.

Hi guys,

I can replicate this issue now when you have any page is using WooCommerce Gutenberg blocks. (Cart / Checkout)

We are investigating the root cause.

Will update here soon.

Regards,
Jenn

1 Like

As a temp workaround, please turn this ON

===============
Root cause:
We deregistered wp-polyfill JS script in the builder and registered it as false to improve builder performance since 1.9.5
Bricks Code

Based on WP documentation, wp_register_script( 'YOUR_HANDLER', false) is valid.

But in new Woo, there is a Woo logic to gather all registered dependency scripts
WooCommerce code


We will see how to tweak our logic in Bricks.

Regards,
Jenn

Yes, WooCommerce does run some cron jobs overnight

Any update on how to bypass this issue for now? Or need to roll back the woocommerce?

Hi @eins

You can try turn on WP Polyfill or actually you can update to Bricks 1.12 now.

1 Like

Hi guys,
We fixed this issue in Bricks 1.12, now available as a one-click update in your WordPress Dashboard.

Changelog: Bricks 1.12 Changelog – Bricks

Please let us know if you are still experiencing issues.

Best regards,
timmse

3 Likes