Background of the issue:
I am trying to address a compatibility issue between the GenerateBlocks 2.x button block and WPML 'sticky links' feature. I enabled WPML and activated the 'sticky links' functionality, created a page or post using the block editor, added a GenerateBlocks 2.x button block, saved the page, and reloaded the editor.
Symptoms:
After reloading the editor, the button block triggers an error: 'This block contains unexpected or invalid content' and offers an 'Attempt Block Recovery' option. This is due to WPML Sticky Links enclosing the HTML of the block into a <p> tag, causing the error.
Questions:
Is there a known solution for the compatibility issue between WPML Sticky Links and GenerateBlocks button block?
Are there any updates or patches available to resolve this error?
So this is considered a new compatibility report. To be able to report the compatibility issues, we need to replicate the issue on a clean installation.
I created a clean installation of WordPress, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below: hidden link
Kindly follow the steps below:
- Install the theme and GenerateBlock
- Create a sample page and use the button in question.
- Try to replicate the issue.
- WPML Sticky links is already installed on the Sandbox website.
This will help us to report the probable issue to the compatibility team and solve the possible problem faster.
I’ve set up a fresh install with GeneratePress and GenerateBlocks (including the Pro version, which I activated to import one of GP default template sites - I've since removed the license key).
If you open the homepage in the block editor, you’ll immediately see the issue on the first two buttons ("Get Started" and "Learn More"). I’ve added actual URLs to those buttons, and that’s when the problem appears.
The same behavior occurs with any other GenerateBlocks button block: as soon as you add a real URL, the block triggers an error once you reload the page in the block editor after saving it. If you either leave the link field empty (or use just #) or disable WPML’s Sticky Links, the issue disappears.
Thank you very much. I tried many times to access the website but it is not working somehow.
I tried to add a new website and it works:
hidden link
So I am not sure if the server has issue with that specific instance or installing GeneratePress had something to do with that.
I asked our system team to take a look into the issue and will get back to you.
In a case that the instance was corrupt I'm afraid I might need you to replicate the issue on the link I mentioned on this reply.
But this time please avoid adding any sort of templates. The whole reason of this step is to add manually a page and use geenrateBlock block and see if the same thing happens or not.