SOLVED: Template Import via WP Admin Area ("Bricks > Templates") deletes global classes from db

Bricks Version: 1.4
Browser: Chrome, Edge

My website is no longer shown correctly in any browser, seems like missing functionality.
Same problem on all pages, posts, etc.
I deactivated all plugins for testing and switched theme, but all with no help/change.
I also change php from 7.4 to 8.0, but no change.

Can you tell me, what is missing/not loaded?

Thanx in advance.
Joachim

So, is the problem that everything is on left, or is there any other problem?
This is what it looks the site for me:

To fix this, I simply commented out some CSS you have for every section. Below is the example. I guess you just upgraded to 1.4 right?, as there were some changes how this works.
slika

And now website looks like this:

Thanx, but website still looks not correct.
There are buttons below Iconlist “mehr iKAS360” and “jetzt Erstgespräch vereinbaren”.

I have no clue at all, where this issue comes from.
No, update to Bricks 1.4 was done 2 weeks ago without any issue.
Website was fine, since I found out today, that the display is terrible.

Hmm, right, there is no button, not even in the code. I’m thinking if it works in builder? Do you have any idea what was changed prior to this? If it does, maybe do hard save (i think shortcut is CTRL-SHIFT-F5)

Usually, when something like this happens to me, there is almost always a plugin problem and I deactivate all plugins to see if the problem goes away. Or maybe some caching.

Thats what I have already checked: deactived all plugins, deactived wp-rocket, etc.
All done with NO effect/change/fix

Uh, sorry, I forgot that you mentioned that already :frowning: How does it look in the builder itself? Are buttons there?

Looks same in the builder.
I just found out, that ALL CSS classes are NOT attached and loaded to all elements in builder.
Thats why it does not work.
But I have no clue, why…

Sorry, I have no idea why would this happen as it never happened to me before. I hope you solve it quickly.

1 Like

I also noticed the same sometimes. For example, I chose a class for an element, but the class was not applied until I refreshed the page. So I think there is a bug.

I’ve seen this kind of bug too several times.
Apply a class to a container, no effect. Save, class is not applied on frontend.
Refresh builder, class has disappeared from the element!

I had to replace container with a new one and move all content to the new container :frowning:

Looks like container was somewhat corrupted: settings on element ID had no effect as well, little yellow modifications indicators where red crosses everywhere (the one supposed to appear on mouse hover).

Was about to report it but it’s kind of random and I can’t reproduce it right now.

1 Like

ALL elements LOST their CSS classes and most CSS classes are no longer available in BricksBuilder. I have no clue how this could happened. Especially because I did not change anything in the last 10 days on wordpress at all (only 2-3 plugin updates happened automatically).

How could it happen, that CSS classes got deleted and removed from ALL events?
Sorry, but I have to tag you now, Stefan, because this is really frustrating @timmse

Hope you can help me.

@joachim.auster What happens when you try to create a css class with the same name as before (if you remember any class name)? Does the builder say the class already exists?

If it’s urgent, you should email support. help@bricksbuilder.io

And if I were you, I’d just rollback the site to a known good state. Surely you have backups? :grimacing:

Hi @joachim.auster ,
Thanks so much for your report!

Apparently, all your classes have been deleted from the database and are not assigned to the elements anymore because they no longer exist. We have a current report that this occurred after importing a template and we’re currently investigating the issue.

The only thing that helps now is to import a backup (and not import any templates until the issue is fixed).

Sorry for the trouble!

Best regards,
timmse

1 Like

Yes, I have a backup and tested the restore on test environment and it works as before importing a template (thats what I did indeed). But I did not guess that importing a template could delete all CSS classes…

Please post it to Facebook Group that no other users run into same problem.

3 Likes

I also noticed this bug with v1.4 update. So it is definitely not related to your setup/plugins.

Created a few sections for my website and used some custom classes to style it. After importing a few templates (json export from my other website) the css classes gets removed. If i remember correctly, the css added to “Custom code” section inside Bricks section, also dissapeared. It happened days ago, so i am not 100% sure, but if the dev team needs it, i will try to reproduce.

Hey Joachim,
you do not know how happy I am about the backup :slight_smile:

We’re working on it and I will get back to you as soon as I can say more.

@roundedhexagon Thanks for your input, Istvan. We are already on the trail of the problem and can reproduce it without much effort.

1 Like

Closing this topic as Bricks 1.4.0.1 provides a fix for the global class on template import bug: Changelog – Bricks

3 Likes

Thanks for releasing quick fixes.

Sorry guys, but Importing template again crashed one of my sites.
It is reproducable with existing JSON file.
I sent you the JSON file already via eMail.
@timmse @thomas

Created template on website with manual hotfix 1.4.0.1
Imported template on website with auto-update 1.4.0.1

This is now worse, because I worked some time today and last backup is from last night.
Not funny at all.

This is the process I followed:

  1. Choose section in Bricksbuilder and make template of it.
  2. Open Templates and export template as JSON file.
  3. Open different website in new window and open an exisiting page in bricksbuilder.
  4. On top right click template and import JSON file to templates (no need to use this template)
  5. Template imported but most of all CSS are gone…

How website looks after loosing CSS:

This is how website should look with CSS:

This is the section I exported and imported (Blocks with defined colors of website)

1 Like