SOLVED: Template “Import with Styles” fails – TypeError in Bricks JS

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)

Hi Bricks Team,

I’m using Bricks on https://staging.balearicboating.eu (currently version [insert version here: 1.9.8 or 2.0 beta]) and trying to import any community template (e.g. “Reality – Home”).

When I click “Import with styles”, nothing happens. In the browser console, I receive the following error:

javascript

CopyEdit

TypeError: Cannot read properties of undefined (reading 'length')
    at Proxy.importThemeStyle...

I’ve tested this on both 1.9.8 and 2.0 beta, with all plugins disabled and default settings. My host (20i) confirms there are no blocks or restrictions and that this error appears to be from within Bricks’ own JS:

https://staging.balearicboating.eu/wp-content/themes/bricks/assets/js/main.min.js?ver=1750073929

Can you confirm if this is a known issue or if a fix/workaround exists?

Many thanks!

Hello @Revival-Media and welcome to the forum. :partying_face:

Is the theme style imported anyway, or it’s not? If it’s not, then the only workaround is to import without theme style, and import theme style manually - if you have access to it.

Let me know.
Matej

Hi @Revival-Media,

I was able to replicate the issue now. I’ll create an internal task for this.

Best regards,
Matej

Hi James,

We fixed this issue in Bricks 2.0 RC, which is now available in your account.
Changelog: Bricks 2.0-rc Changelog – Bricks

Please let us know if you are still experiencing issues.

As with any pre-stable release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.