-
graphiczen
Having an issue where the page freezes when editing a reusable block. We’ve used the workaround and are posting this in order to help others or help GeneratePress/WordPress fix the bug.
Here’s the original code before edit:
<!-- wp:generateblocks/button {"uniqueId":"f34f7db3","hasUrl":true,"blockVersion":4,"hasButtonContainer":true,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"26px","fontWeight":"600","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginRight":"20px"},"borders":{"borderTopWidth":"0px","borderTopStyle":"solid","borderRightWidth":"0px","borderRightStyle":"solid","borderBottomWidth":"0px","borderBottomStyle":"solid","borderLeftWidth":"0px","borderLeftStyle":"solid","borderTopRightRadius":"4px","borderBottomRightRadius":"4px","borderBottomLeftRadius":"4px","borderTopLeftRadius":"4px"},"backgroundColor":"#05bcbf","backgroundColorHover":"#05bcbf","backgroundColorHoverOpacity":0.7,"textColor":"#ffffff","textColorHover":"#ffffff","gradient":true,"gradientDirection":90,"gradientColorOne":"#05bcbf","gradientColorOneOpacity":0.6,"gradientColorTwo":"#0693e3","gradientColorTwoOpacity":0.6,"hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"}} -->
Here’s the code after the edit:
<!-- wp:generateblocks/button {"uniqueId":"f34f7db3","hasUrl":true,"blockVersion":4,"hasButtonContainer":true,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"26px","fontWeight":"600","textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginRight":"20px"},"borders":{"borderTopWidth":"0px","borderTopStyle":"solid","borderRightWidth":"0px","borderRightStyle":"solid","borderBottomWidth":"0px","borderBottomStyle":"solid","borderLeftWidth":"0px","borderLeftStyle":"solid","borderTopRightRadius":"4px","borderBottomRightRadius":"4px","borderBottomLeftRadius":"4px","borderTopLeftRadius":"4px"},"backgroundColor":"#05bcbf","backgroundColorHover":"#05bcbf","backgroundColorHoverOpacity":0.7,"textColor":"#ffffff","textColorHover":"#ffffff","gradient":true,"gradientDirection":90,"gradientColorOne":"#05bcbf","gradientColorOneOpacity":0.6,"gradientColorTwo":"#0693e3","gradientColorTwoOpacity":0.6,"hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"}} -->
In the 1st case, you’ll notice a stray
,”fontSize”: “”
after the
“typography”: {….}
attribute. I think that’s a bug in how some previous version of GenerateBlocks saved its blocks. Editing the reusable block corrected the problem.Hope this helps.
-
Hi there,
Thanks for sharing, however the code is unusable as the format has been changed since it’s not wrapped in the code tag.
It would be nice if you can edit your first post and wrap the code with the code tag.
- You must be logged in to reply to this topic.