Global styles losing their labels

Every once in a while, I come across a problem that I find annoying regarding global style classes that were named/labeled to something easy to remember.

If I go back to edit the style, the name disappears and it is replaced by an automatically generated default. In the attached screenshot the headline block was previously labeled as “privacy1” but that was washed away.

If I don’t spot this problem when editing, then the corresponding blocks on the site lose all their styles and it means going back to edit the global styles one more time.

Is there any way to put an end to this?

Screenshot 2022-11-07 at 12.13.51

How about helping with this?

@alesia I opened the issue on GitHub, we will take a look and fix it in the next version.

Reference: Global styles losing their labels · Issue #769 · tomusborne/generateblocks · GitHub

Thank you. Getting rid of this little bug will be very nice :slightly_smiling_face:

I’m not able to replicate this issue at all.

Can you see if it continues to happen with all other plugins deactivated?

Maybe I should learn to tolerate this since the idea of deactivating plugins for testing isn’t the most attractive one at the moment.

Are you able to spin up a staging site? The idea behind this bug is pretty major as it would completely break the Global Styles functionality. My assumption is something locally to your site is happening as we haven’t had reports of this elsewhere.

I can confirm that this problem completely breaks the affected global styles when it happens. Very annoying.

As I use Cloudways, I should be able to set up a staging site for testing, without too much pain.

What timeline do you have for looking at this? It might be useful to know if I’m going to take a little time to do this.

It’s absolutely maddening, actually. Just found another example on my site. One shouldn’t have to always check whether their global styles keep working.

Definitely not, but there isn’t a bug that does this to everyone regardless of their environment at this time. We need to figure out what about your environment is causing the bug (a specific plugin, for example) so we can debug properly to find what’s going on.

If you’re able to set up a staging site and disable your plugins to see if that’s the case it would definitely help.

If I may jump in, I think the cause of this might be when applying the global style to the button container and not the button itself (within the button container).
For me, this happened a few times before, I have to make sure I’m applying the global style to the actual button and not the container.
I think the solution might be to allow the global style to be applied either to the button or the button container but not a variation.
Hope this make sense…

What you say makes sense. One shouldn’t apply the wrong global style to a class.

However, global styles can also be created for wrappers, in addition to individual buttons, to control the styling as you can see in the attached screenshot. I use that to make a button full width.

Also, the problem affects other types of individual styles as well.

Gonna look into making a staging site in a couple of days and test to provide @Tom feedback if there are findings.