Troubleshooting Page Builder Layout Export Issues: Iframes, Security, and JSON Errors
Content
Exporting layouts is a powerful feature of the Page Builder by SiteOrigin, but users occasionally encounter problems when their content contains specific elements like iframes or when security software interferes. This guide covers the most common export issues and their solutions.
Common Export Problems and Their Causes
1. Issues with Iframes and Custom HTML Code
Users frequently report errors when attempting to export layouts containing iframes or other embedded HTML in a Custom HTML widget. The Page Builder's validation system may flag certain attributes as potential security risks, preventing the export from proceeding.
Solution: Review your iframe code for problematic attributes. Try modifying or removing attributes like allowfullscreen or frameborder, as these can sometimes trigger validation errors. The Custom HTML widget may display a red 'X' icon with more specific error information when you hover over it.
2. Export Button Not Responding (Likely Security Block)
If the export button does nothing when clicked, particularly with layouts containing iframes or complex code, this is typically caused by a security system blocking the export request.
Solution: This blocking can occur at multiple levels:
- Server Security (Mod_Security): Many hosting providers use Mod_Security rules that may flag export requests containing certain code patterns as potentially malicious. Contact your hosting provider, explain you're trying to export Page Builder layouts, and ask if they can review or whitelist the relevant rules for your account.
- WordPress Security Plugins: Plugins like Wordfence can also interfere with the export functionality, especially with larger layouts.
3. Security Plugin Conflicts (Wordfence Example)
Security plugins, including Wordfence, may prevent the export functionality from working correctly, often with larger or more complex layouts.
Solution: If using Wordfence, try setting the firewall to "Learning Mode" temporarily before attempting your export. This allows the plugin to learn that the export action is legitimate. After completing the export, you can return the firewall to its previous setting. For other security plugins, look for similar learning modes or options to whitelist specific admin actions.
4. Exported JSON Contains Extra Escape Characters
Some users find their exported JSON files contain numerous unwanted backslashes and quote characters ("{"widgets":[{"image":3260...), making the files difficult to read or edit manually.
Solution: This typically occurs due to double-encoding during the export process. To clean the JSON for use as a prebuilt layout, you can use online JSON validators or formatting tools. Paste the exported content into a tool like JSONFormatter.org, which will parse and reformat it into clean, readable JSON without the extra escape characters.
General Troubleshooting Steps
- Test with minimal content: Try exporting a simple layout first to confirm the basic functionality works.
- Disable plugins temporarily: As a test, temporarily disable security and other plugins to identify potential conflicts.
- Check error logs: Your server's error logs or WordPress debug log may contain specific information about what's causing the block or error.
Most export issues relate to security measures at either the server or plugin level, or validation of specific code elements within widgets. Following these steps should help resolve the majority of export problems encountered with Page Builder by SiteOrigin.
Related Support Threads Support
-
Iframe Code Error in Custom HTML Widgethttps://wordpress.org/support/topic/iframe-code-error-in-custom-html-widget/
-
Unable to export layout containing iframehttps://wordpress.org/support/topic/unable-to-export-layout-containing-iframe/
-
‘Export Layout’ problem with Wordfence 7.4.5 (year 2020)https://wordpress.org/support/topic/export-layout-problem-with-wordfence-7-4-5-year-2020/
-
Exported Layouts have unwanted charactershttps://wordpress.org/support/topic/exported-layouts-have-unwanted-characters/