GutenSlider blocks fail in multisite: missing attribute declarations
-
Hello,
I am contacting you regarding your extension GutenSlider, which I find very well designed and genuinely useful. It provides features that are valuable for editors, and I would be glad to use it in production environments.
However, I have encountered a significant issue when the extension is used in a WordPress multisite installation. The blocks work correctly in a single-site setup but become unstable or impossible to save in multisite. The symptoms include:
- blocks flagged as “invalid content / attempt to recover”,
- some attributes disappearing after saving,
- page updates failing (“The update failed”),
- different behavior between Super Admin and regular site admins.
After a detailed review, the root cause seems clear:1. The blocks rely on many complex nested attributes…
GutenSlider uses a large set of attributes:
- Desktop / Tablet / Mobile structures,
- JSON-based style and layout objects,
- autoplay, navigation, pagination settings,
- dynamic CSS-related objects,
- various slider configuration parameters.
This level of complexity is normal for a block offering advanced layout control.2. …but these attributes are not declared in the block’s
block.jsonIn multisite environments, WordPress applies strict validation rules:
- REST API schema validation is enforced,
- KSES sanitization is strict for non-super-admin roles,
- attributes not declared in
block.jsonare rejected or stripped.
Since the attributes used by GutenSlider are not listed in the block schema, WordPress:
- removes or alters nested JSON objects,
- invalidates the block when reloading the editor,
- may completely prevent saving via the REST API,
- causes repeated recovery attempts.
This issue does not appear in a single-site installation but is systematic on multisite networks.3. To ensure multisite compatibility, one key step is required
👉 All attributes used by the GutenSlider blocks need to be declared in
block.json.Each attribute should define:
- its
type, - its
defaultvalue, - and, when applicable, a full object structure (e.g., Desktop/Tablet/Mobile).
This is necessary for Gutenberg and WordPress multisite to accept the block’s content.4. Suggested approaches for a long-term fix
- Add a complete list of attributes to the
block.jsonfiles matching the React component usage. - Test GutenSlider in a clean multisite environment without
unfiltered_html. - Compare with block libraries that handle complex schemas successfully (Kadence, Spectra, GenerateBlocks, etc.).
- If needed, consider using a dynamic block with a
render_callbackto bypass strict HTML validation.
If you need sample block output or additional technical details to reproduce the issue, I am happy to help.
Best regards,
Laurent
You must be logged in to reply to this topic.