WAIT: Fatal Error when editing Template

I have encountered an error while editing a template. When I attempt to edit my header via the backend and templates, I receive an extensive error message (with error reporting on in wp). However, when I go directly to the page and select “edit header” at the top, it works without any issues. The header itself is unremarkable and contains only a few elements. I had a similar problem with another page with filters. There, I have to reassign the filters so that the error no longer appears.


Header

Error Message:
**Fatal error**: Uncaught TypeError: Cannot access offset of type string on string in /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/helpers.php:975 Stack trace: #0 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/helpers.php(1018): Bricks\Helpers::get_element_data() #1 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/helpers.php(1943): Bricks\Helpers::get_element_settings() #2 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/code.php(195): Bricks\Helpers::sanitize_element_php_code() #3 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Code->render() #4 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #5 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/container.php(934): Bricks\Frontend::render_element() #6 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Container->render() #7 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #8 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/container.php(934): Bricks\Frontend::render_element() #9 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Container->render() #10 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #11 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/container.php(934): Bricks\Frontend::render_element() #12 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Container->render() #13 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #14 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/container.php(934): Bricks\Frontend::render_element() #15 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Container->render() #16 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #17 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(784): Bricks\Frontend::render_element() #18 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/templates.php(283): Bricks\Frontend::render_data() #19 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/shortcodes.php(434): Bricks\Templates->render_shortcode() #20 [internal function]: do_shortcode_tag() #21 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/shortcodes.php(273): preg_replace_callback() #22 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/nav-menu.php(1998): do_shortcode() #23 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-hook.php(324): Bricks\Element_Nav_Menu->walker_nav_menu_start_el() #24 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters() #25 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/utilities/a11y-walker-nav-menu.php(238): apply_filters() #26 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-walker.php(150): Aria_Walker_Nav_Menu->start_el() #27 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-walker.php(252): Walker->display_element() #28 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/nav-menu-template.php(621): Walker->walk() #29 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/nav-menu-template.php(241): walk_nav_menu_tree() #30 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/nav-menu.php(1836): wp_nav_menu() #31 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Nav_Menu->render() #32 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #33 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/container.php(934): Bricks\Frontend::render_element() #34 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Container->render() #35 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #36 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/container.php(934): Bricks\Frontend::render_element() #37 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/elements/base.php(2625): Bricks\Element_Container->render() #38 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(639): Bricks\Element->init() #39 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/frontend.php(784): Bricks\Frontend::render_element() #40 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/builder.php(1449): Bricks\Frontend::render_data() #41 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/builder.php(313): Bricks\Builder::builder_data() #42 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-hook.php(324): Bricks\Builder->enqueue_scripts() #43 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #44 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #45 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/script-loader.php(2299): do_action() #46 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts() #47 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #48 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #49 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/general-template.php(3192): do_action() #50 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/header.php(7): wp_head() #51 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/template.php(810): require_once('...') #52 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/template.php(745): load_template() #53 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/general-template.php(48): locate_template() #54 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/template-parts/builder.php(2): get_header() #55 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-includes/template-loader.php(106): include('...') #56 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-blog-header.php(19): require_once('...') #57 /var/www/vhosts/url-replaced-for-posting.com/httpdocs/index.php(17): require('...') #58 {main} thrown in **/var/www/vhosts/url-replaced-for-posting.com/httpdocs/wp-content/themes/bricks/includes/helpers.php** on line **975**

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

[Please describe this bug in as much detail as possible so we can replicate & debug this bug]

Hi @typomaniac,

can you export the template that is causing trouble so I can import it and test it on my local installation?

Thank you,
Matej

sure!

sure! thank you. Can i send it to you in private?

Hi @typomaniac ,

Of course. You can send it via DM or to help@bricksbuilder.io using the email address you used during the purchase + a link to this topic.

Thanks,
Matej

great. i already sent a link to you. Thanks!

Hi @typomaniac,

thank you for sending the template. I’ve imported it locally, but unfortunately, I can’t replicate the issue.
Can you try to remove it, and import it again?

If that will not work, I would ask if you can send temporary login credentials to your test/staging (if you have staging) website and a link to this topic to help@bricksbuilder.io using the email address you used during the purchase, so we can take a look?

Thank you,
Matej