This thread is resolved. Here is a description of the problem and solution.
Problem:
You are working on a site under development and trying to translate pages using the WPML plugin. You encountered issues with custom Gutenberg blocks after translation, specifically an "Attempt Block Recovery" error.
Solution:
1. We created a minimal installation of WordPress, WPML, and all necessary WPML add-ons, and themes for you to replicate the issue.
2. Upon further investigation, it appears the issue arises from a mismatch between the stored attribute in the block comment and the actual rendered HTML. For example, the attribute might say
btntext: "View all testimonials es"
but the actual HTML renders as View all testimonials a. This discrepancy causes Gutenberg to flag the block as invalid.
3. To resolve this, manually adjust the mismatch in the code view. Ensure that the block defines the attribute from the anchor text correctly in your block.json or registerBlockType and in your save() function render. Consult with your developer to make these adjustments.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 3 replies, has 0 voices.
Last updated by 3 months, 3 weeks ago.
Assisted by: Dražen.


