- This topic has 6 replies, 3 voices, and was last updated 2 years, 5 months ago by Tom.
-
AuthorPosts
-
October 28, 2021 at 6:25 am #1980344Bela
Hi,
I use GeneratePress + GP Premium on many sites.
After I update to the latest GeneratePress theme, on every sites, Containers get 40% padding if I edit an old page.
Screenshot about the issue: https://prnt.sc/1xly9pd
It’s a very frustrating issue, because these websites has many pages with Containers, and I need to reset padding manually.
WP 5.8.1
GP 3.1.0
GPP 2.1.0I tried clear cache, disable plugins, etc.
Please help me, how to solve this issue?
Thanks,
BelaOctober 28, 2021 at 6:28 am #1980350BelaExtra information, I use GenerateBlocks 1.4.0, too on these sites.
October 28, 2021 at 8:05 am #1980768BelaI think I found the cause of the error, Generate Blocks (free version) is causing the error.
After I update Generate Blocks from 1.3.5 to 1.4.0 each Container gets 40% padding if its value was previously empty.
October 28, 2021 at 9:07 am #1980878TomLead DeveloperLead DeveloperHi there,
In 1.4.0 we changed the padding defaults from 40px to 0px.
In order to do this, we had to add migration to make sure that users who were using the 40px don’t lose their padding. When you load the editor, it will check to see if no value exists (which means it was using the old default). If no value exists, it adds the old 40px default. This prevents users from losing their Container padding.
This is the opposite of what is happening to you. The issue here is you’ve somehow made it so these padding values are empty even though it wasn’t possible to do prior to 1.4.0: https://www.screencast.com/t/TwTU3KKirAQc
The editor would automatically add a
0
value if it was emptied. How were you able to empty the field without having a0
value?Since they have no value at all, the system assumes the old default is being used, so it adds it for you (thinking it’s doing you a favor).
The only potential solution here is to disable the migration by telling it your default was already empty. However, this will make it so any Container blocks you have that are using the old 40px default will now have no padding.
You can do that using this snippet: https://community.generateblocks.com/t/change-the-default-container-padding/287
Sorry for the inconvenience here – the migration was built to minimize issues like this, especially as it was previously very difficult to actually have an empty value like you do here.
Let me know if the default change works for you.
November 2, 2021 at 3:57 am #1987755ElenaHi!
I’ve experienced the same problem updating to GB 1.4.0. Is it possible that the values were emptied because I’ve been using GB since beta stage, and back then the 0 value were not added?
Anyway, using the suggested snippet the problem was solved for me, I’m only writing to state that this problem could happen to more people, and hopefully to help to detect why fields could be empty.
November 2, 2021 at 4:11 am #1987780BelaThank you for the snippet, I’ll try it.
Further information, I used on these websites your demos as a starting point. Where I used the demo blocks’ styling, I have issues with padding, where I add my own elements, it works well. Will it work well in the newly imported demos?
November 2, 2021 at 7:35 pm #1989039TomLead DeveloperLead DeveloperFran – that could certainly be the issue. It’s one of the only instances I can think of where that field would have been emptied.
Bela – we’ve updated the majority of our Site Library sites already, and we’re slowly updating the GB Pro templates as well 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.