After updating to 1.9.6.1 I lost all classes

After updating to 1.9.6.1 I lost all classes… :confused:

https://jam.dev/c/1a63f0d0-08f7-460c-99b9-58cc581fcf63

Hi @batorbator,

As I just shared on FB, please get in touch with us at help@bricksbuilder.io with temporary admin access so we can investigate the issue.

ok, I sent it.
thanks.

Hi @batorbator

As per our email reply, the credential is not working.
However, based on your video, there are JS errors in your browser.
Suspect it’s browser cache issue. Try clear the browser cache or use incognito browser to check. The CSS classes in Bricks shouldn’t missing upon update :slight_smile:

Regards,
Jenn

Hi @batorbator

I have the same error, I think I have been able to isolate the error. It seems that there is an error parsing the option array of the BRICKS_DB_GLOBAL_CLASSES constant. If I overwrite the option with an empty array, Bricks works again, and I can create new classes, but logically all previously created classes are gone.

EDIT: (Potential Quickfix):
I exported the BRICKS_DB_GLOBAL_CLASSES before and went through the array manually to find the error, in my case, the keys of this array were not consecutive from one point (see attached screenshot), when I adjusted the keys of the associative array, and updated BRICKS_DB_GLOBAL_CLASSES with the new array, Bricks works normally again.

Quickfix:

Create a backup copy before using this potential Quickfix solution.

Step 1:
var_export(get_option( 'bricks_global_classes', [] )); wp_die();

Copy the array and search for gaps in the keys of the associative array, adjust them manually so that the keys are consecutive. (In my case, it was the keys, 201 - 206 which I changed to 91 - 96)

Step 2:
Update the modified array via update_option('bricks_global_classes', YOUR_ARRAY);.

@itchycode maybe this helps you to investigate the problem?

Best regards
David

1 Like

Hi @schrittweiter ,

Thank you very much for your sharing.
We don’t recommend to touch the DB before identify the root cause :slight_smile:
Especially it shouldn’t happen when theme update :slight_smile:

We do have similar case like empty array in between some global classes key in the DB. But this will not cause all classes missing in the builder. It will only cause those global classes created after the empty array unable to generate CSS in actual frontend. By the way, that is another issue when using third-party plugin :slight_smile:

Regards,
Jenn

Yesterday I had the same problem on another website: https://test3.ulworks.com/. So I did some investigating and I think I found the cause in my case (it wasn’t the Bricks update itself as I previously thought). Although it seems quite strange, because the classes disappear when I remove the inactive Fancy Animationn plugin (https://fancyanimations.com/). I tested this three times on a fresh copy of the site and it worked every time.

I am sending a screen recording, and I can also provide login details on another copy, where you can check it yourself by removing the plugin.

screen recording with marked errors in the console:
https://jam.dev/c/78a326c3-d956-4136-91fc-d784e14d25c0

2 Likes

We also used the Fancy Animation plugin (https://fancyanimations.com/) and deleted it, but it didn’t occur to me that this could have been the cause. Thanks @batorbator for the tip.

Regards,
David

Another video where the situation repeats itself. To check, I first set the Fany Animations plugin to erase all data upon uninstallation. The effect is the same. I will also add that I have never used any effect from this plugin anywhere on this website. I simply installed it, didn’t use it, and then wanted to remove it.

https://jam.dev/c/eafe6c43-d308-4dd3-aa78-aa904009e5dd

Hi @batorbator & @schrittweiter,

Thank you @batorbator for sharing access to a test site :),

I’ve reviewed the information you provided and conducted some tests on the test site. When I remove the Fancy Animation plugin, I can see the same issue you described. Interestingly, when I deactivate all other plugins on the test site (ACSS, Frames, and Advanced Themer), the console errors in the builder also disappear.

From these observations, the issue is most likely not directly related to Bricks (as you have also noticed). Since the problem persists with the Fancy Animation plugin and resolves upon its deactivation, it suggests that the root cause might be linked to this specific plugin or its interaction with the other plugins on your installation.

I recommend reaching out to the support team for Fancy Animations for further assistance. Additionally, it might be beneficial to test this scenario in a clean installation with only the Fancy Animations plugin active. This could help isolate the issue and determine whether it’s specific to the interaction between Fancy Animations and Bricks or influenced by other plugins.