Black Friday33% off all plans See plans Enter it at checkout
In Progress

WordPress export: Greenshift blocks are missing id/localId, so the block editor crashes on large pages (WordPress 7.x)

3

Hello,
Since updating to WordPress 7.1.4 (on 6.9 everything was fine), every large page exported from GreenLight to WordPress crashes the block editor. The tab freezes (“Page unresponsive” -> “Wait”), then Chrome/Edge shows “This page is having a problem”. Small pages (~200 blocks) open fine. Pages with 1,500+ blocks crash every time, including after updating GreenLight to the latest version.
Environment: WordPress 7.1.4, PHP 8.4.27, Greenshift 13.2.2 (latest), Greenshift theme 2.6.6, Chrome/Edge on Windows 11. The server has a 512 MB PHP memory limit, so the server is not the bottleneck: the browser tab runs out of memory.
Root cause: the exported greenshift-blocks/element blocks have no “id” / “localId” attributes, for example:
When the editor loads, Greenshift generates and writes id + localId for every block, one updateBlockAttributes call per block. WordPress 7.x loads its real-time collaboration layer in the editor (Yjs is loaded, and the canvas has a “collaborators-overlay” element). It reacts to each of these thousands of updates, and memory use explodes.
Measurements, same 1,520-block page in the block editor:
Content as exported (no IDs): the JS heap grows past 3.4 GB in under a minute and the tab crashes.
Same content with unique “id”:”gsbp-xxxxxxx”,”localId”:”gsbp-xxxxxxx” added to every block: loads in under a second with about 190 MB of heap.
On a 145-block subset, the exported content triggered about 600 store changes right after load. Every block changed exactly two attributes: id and localId.
Requested fix: please have the exporter write a unique “id” and an identical “localId” (format “gsbp-” + 7 hex characters) on every greenshift-blocks/element block. One detail: for blocks with “styleAttributes”, Greenshift’s save output also adds that ID as a class on the element (e.g. <svg … class=”gsbp-xxxxxxx”>). The exporter must add that class too, otherwise those blocks fail validation.
Current workaround: after each export, we add the IDs to the saved post content through the REST API, then open the page in the editor and click Update.
Thank you!

contact1

⏱

Replies

Responses

  1. must be fixed now

  2. contact1 Avatar
    contact1
    Member

    Gave it to the agent, asked it to add id-s to one of the problematic pages and it said it cannot add ids, asked it to make a reply for this purpose and this is what it came with:

    Hi,

    Thanks for the quick reply. Could you tell me a bit more about the fix, so I can test it properly?

    Where is the fix? Is it in the VS Code extension, in the WordPress-side plugin or connector, or on your server?

    Which version has it? I’m on GreenLight 0.30.48, which is the latest version on the VS Code Marketplace, installed on August 21. In this version’s dist/extension.js, block IDs (“gsbp-…”) are only generated in the single-block code-only export. The normal export to separate greenshift-blocks/element blocks still writes no “id” / “localId”. If the fix is in a newer build that isn’t on the Marketplace yet, could you send me the .vsix or tell me when it will be published?

    Is any setting needed? Do I need to change a setting or export mode to get the IDs?

    The class on styleAttributes blocks: does the fix also add the matching class to elements of blocks with “styleAttributes” (for example )? Without that class, those blocks fail validation in the editor.

    As soon as I know which version to use, I’ll export a 1,500-block page and confirm whether every block gets a unique “id” and the same “localId”.

    Thank you!

  3. contact1 Avatar
    contact1
    Member

    Forgot to mention, I’m on 16.4.0 version

Post a Reply