When I edit a post that's using Gutenberg I am seeing a blank page only when I import content, it works fine before I import and the content after import is showing fine on the front end I just can't load the admin editor.
I've checked all the error logs, and have tried turning error reporting on but I can't see any errors (have also checked the console log) - how would I go about debugging this? I assume it's because some rouge content was imported or something but it's not really feasible to trawl through the database to find it?
A white page is a common symptom of the Editor encountering an issue in parsing the block markup from the post_content
.
For some blocks, if the theme or plugin that created them is not installed, they provide HTML support so the content can still render on the front end, but is not editable in the Editor. Alternatively, something required to edit the post content (plugin/theme/template part) is missing or the wrong version.
To debug this, I would try:
Check the log of the source site the content was exported from incase the error actually occured during the content export/the export was incomplete.
Confirm the plugins installed & activated match the plugins from where source content was exported.
Ensure the plugin versions are not being auto-upgraded before you import the content by adding add_filter( 'auto_update_plugin', '__return_false' );
to wp-config.php
In the database, view the post_content
of an issue post/page to identify the blocks used with select post_content from database_name.wp_posts where id = <post_id>;
(pick a page from the front end with minimal content and start from there to narrow down potential issues faster).
Potentially the post_content
contains reusable blocks and or template parts that have not been exported from the source site, if so, export/import them from source site.
If the above steps haven't helped resolve the issue, re-export the content in smaller batches, or by post type (if there are multiple/custom post types) then import a smaller amount of content to help narrow down if the issue is isolated to a particular post type or a common block.
If you find anything during these steps but aren't able to fully debug it, add any new information you discover to your question.