SOLVED: Can't Access Builder After Migration - Missing Component Error

Update:
I just copied the bricks_components files from the dev site to the local db and still get the fatal error. This looks like a bug with Bricks as opposed to an error in the migration.

Update:

I’ve discovered this is affecting multiple pages, not just two. Every page that uses a component is throwing the same error with different component IDs (‘pzyjbs’, ‘jtwtfa’, etc.).

It appears the bricks_global_data in wp_options didn’t migrate properly from WP Engine to Local, so all components are missing from the local database even though pages still reference them.

Issue: I pulled my site from dev to local and now I’m getting this error when I try to open the Bricks builder:

Fatal error: Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, bool given in helpers.php:1060

What’s Happening: A couple of my pages reference a component (ID: pzyjbs) that exists on dev but didn’t come over when I migrated to local. Looking at the code, it seems to be a nested accordion element within a component.

The real problem is: because of this one component error, I cannot access the builder on local


at all to remove the element causing the problem.
I’m completely locked out of editing these pages in Bricks.

What I’ve Tried:

  • Cleared all caches
  • Re-importing page templates (but I think components are stored separately?)
  • I can’t find a way to export/import individual components in Bricks

Questions:

  1. How do I properly export this component from dev so I can import it to local?
  2. Or is there another way to fix the reference without having access to the builder?

Any help would be appreciated - I’m stuck and can’t edit these pages at all!

Browser: Chrome (latest version) OS: Windows (Local by Flywheel environment) URL: Cannot provide - occurs on local development site when attempting to access builder Video: N/A

Detailed Description:

I’m using WP Engine for my live/dev environment and Local by Flywheel for local development.

Steps to Reproduce:

  1. Pull database from WP Engine dev site to Local by Flywheel
  2. Attempt to open Bricks builder on pages with post IDs 529 and 765
  3. Fatal error occurs immediately, preventing any access to the builder

Error Details: The error occurs in helpers.php at line 1060, where array_column() receives false instead of an array. This happens when the code tries to load component ‘pzyjbs’ which exists in the dev database but is missing from the local database after migration.

Impact: Complete loss of builder access on affected pages - cannot edit, cannot remove the problematic element, cannot access any templates or components through the builder interface on these pages.

Database Investigation: Confirmed via SQL that component ‘pzyjbs’ does not exist in local wp_options table under bricks_global_data, but the pages still contain references to it in their _bricks_page_content_2 meta values.

Hey,

I have a similar issue, going to post my details to see if we have similarities with the hope that we’ll both figure this out. I am using Bricks with Next Bricks.

I migrated from one host to another by reinstalling Wordpress, SCPing the public_html folder, and then importing the DB. I corrected the DB credentials in wp-config.php.

My website loads fine when I open it up, and it loads fine in incognito. When I try to load it after logging into the admin panel, I get the exact same error. Note the admin page is fully usable (except specifically the Bricks Templates, Bricks Custom Fonts, Wordpress Pages, Wordpress Posts pages. All of those wp-admin pages give me the same result as just going to be site; the below error). I can alternate between a logged-in browser and an incognito one; the logged-in consistently produces the error on refresh while the incognito one work without issue.

The stack trace specifically is:

Uncaught Error: array_column(): Argument #1 ($array) must be of type array, false given
in /home/WEBSITE/web/WEBSITE.com/public_html/wp-content/themes/bricks/includes/helpers.php on line 1089

Call stack:

array_column()
wp-content/themes/bricks/includes/helpers.php:1089
Bricks\Helpers::get_component_by_cid()
wp-content/themes/bricks/includes/helpers.php:1154
Bricks\Helpers::get_component_instance()
wp-content/plugins/nextbricks/elementsConditionalCSS.php:360
NextBricks\includeElementsConditionalCSS::load_elements_from_this_part()
wp-content/plugins/nextbricks/elementsConditionalCSS.php:260
NextBricks\includeElementsConditionalCSS::enqueue_styles()
wp-includes/class-wp-hook.php:324
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:348
WP_Hook::do_action()
wp-includes/plugin.php:565
do_action_ref_array()
wp-includes/class-wp.php:835
WP::main()
wp-includes/functions.php:1342
wp()
wp-blog-header.php:16
require('/home/WEBSIT...l/wp-blog-header.php')
index.php:17

Haven’t dug into the specific component logs yet, but that’ll be my next step. I’ve made the move twice, same issue twice. Going to continue digging deeper to see what my problem might be, we might have different causes but the stack trace points to a component issue as well.

Dug into it some more. I think you might be right in that Bricks stores data outside of the database and public_html folder at the very least. The issue for me seems to like with NextBricks.

Notably, if I disable NextBricks, I load the homepage in complete disarray, but it does not error out the same way. I can also open up the admin Templates, Custom Fonts, and the Wordpress Pages page without issue. The issue seems to lie with the way NextBricks stores data. I wonder if the issue is the way NextBricks is storing data or something along those lines, I will be making a post in their forums as well.

I got the error after trying to start a code review within the admin UI. The errors also started to bleed out into non-logged in non-admin pages as well.

So far, I’ve seen these variations, all ending in the same place:


I am considering removing components from my migrated site in the meantime and seeing if that fixes the issue.

Hi @parabellam ,

Based on your errors, it seems that your component data has been corrupted.

You should compare the bricks_components (in option table) data on your current site with the one you imported.

Maybe the tool you used for importing the database has an issue?

Regards,
Jenn

Hi @nicknick

I mark this forum thread as “SOLVED” as the latest Bricks 2.1.2 solved your issue.