FlexObject Items Invisible in Preview Mode (possible culprit: IDML Roundtrip)
Bug Report: FlexObject Items Invisible in Preview Mode (probably bugged after IDML Roundtrip)
Product: Adobe InDesign 2025 (v20.x)
Feature: Flex Layout / FlexObject (new in InDesign 2025)
Severity: Major — affects preview mode of the new flex objects
Date: February 20, 2026
Summary
FlexObject containers and their child items become invisible in Preview screen mode (but remain visible in Normal mode and Overprint Preview) after a document has undergone an IDML export/import roundtrip. The issue also propagates to any copies made from affected objects — even copies placed outside the FlexObject container.
The root cause was identified as a missing registration of these page items in the internal spread-level page item collection. Items exist in page.allPageItems but are absent from spread.allPageItems, which Preview mode apparently relies on for rendering.
Suspected Trigger
The affected document had previously undergone an IDML roundtrip (export as .idml, then reopen). The document contains FlexObject containers (the new Flex Layout feature introduced in InDesign 2025). The hypothesis is that the IDML reconstruction does not fully re-register FlexObject items in the spread's internal page item hierarchy. Since FlexObjects are a very new feature, it is plausible that the IDML serialization/deserialization path does not yet handle them with full fidelity.
Steps to Reproduce
- Create a new InDesign document.
- Add a Flex Layout container (FlexObject) with several child items (e.g., image frames with the object style "Album in REZI KURZ").
- Save and export the document as IDML (.idml).
- Close the document and reopen the exported .idml file.
- Save as .indd.
- Switch from Normal screen mode to Preview screen mode (View → Screen Mode → Preview, or press W).
Expected: All items remain visible.
Actual: The FlexObject and all its children disappear entirely.
Additional observation: Copying an affected item out of the FlexObject and pasting it elsewhere on the page does not fix the issue — the copy inherits the "unregistered" state. Even extracting just the placed image (graphic content) from a frame and pasting it into the document independently produces a new frame that is also invisible in Preview mode.
Systematic Exclusion of Common Causes
The following properties were checked programmatically (via ExtendScript) on all affected objects and confirmed to be not the cause:
| Property / Setting | Value Found | Would Cause Invisibility? |
|---|---|---|
| item.nonprinting | false on all items | No — correctly set |
| item.visible | true on all items | No — correctly set |
| item.itemLayer.visible | true | No — layer is visible |
| item.itemLayer.printable | true | No — layer is set to print |
| item.transparencySettings.blendingSettings.opacity | 100 on all items | No — fully opaque |
| Object Style .nonprinting | false on all relevant styles | No — styles do not suppress printing |
| item.fillColor | "None" (frames are graphic frames) | Not relevant |
| Geometric bounds vs. page bounds | All items within page boundaries | No — not on pasteboard |
| Link status of placed images | NORMAL on all images | No — links are intact |
| Content type of frames | GRAPHIC_TYPE | Correct |
Key distinction: Items are visible in Overprint Preview (View → Overprint Preview) but invisible in Preview screen mode (the mode that hides guides and pasteboard). This rules out any rendering/transparency issue and points to a metadata/registration problem specific to Preview mode's rendering path.
Diagnostic Finding: Missing Spread Registration
Using ExtendScript, the following discrepancy was discovered:
// On an affected document:
spread.allPageItems.length; // → 0 (WRONG — should contain items)
page.allPageItems.length; // → 21 (correct — all items present)
// After creating a NEW rectangle via script on the same page:
spread.allPageItems.length; // → 1 (new item registers correctly)
page.allPageItems.length; // → 22
All 21 page items (1 FlexObject + 9 Rectangles inside it + 10 Images + 2 loose Rectangle copies) were found via page.allPageItems but none appeared in spread.allPageItems.
A freshly created Rectangle (via page.rectangles.add()) registered in spread.allPageItems immediately, confirming that the spread collection mechanism itself works — it is specifically the IDML-reconstructed FlexObject items that fail to register.
This strongly suggests that Preview mode uses the spread.allPageItems collection (or an equivalent internal list) to determine which items to render, while Normal mode and Overprint Preview use a different rendering path that includes all items regardless of spread registration.
Workaround
A manual workaround was discovered and automated via ExtendScript:
- Cut the affected top-level item.
- Create a temporary Rectangle on the page.
- Paste Into the temporary Rectangle (Edit → Paste Into).
- Select the pasted item inside the container and Cut it back out.
- Remove the temporary Rectangle.
- Paste the item back onto the page.
- Restore the original geometric bounds.
This paste-into/cut-out cycle forces InDesign to re-register the item in the spread's internal collection. After this procedure, the item (including FlexObjects with all their children) appears correctly in Preview mode.
An automated repair script was developed that:
- Detects all top-level items present in page.allPageItems but absent from spread.allPageItems
- Applies the paste-into workaround to each affected item
- Verifies successful re-registration afterward
- Groups the entire operation under a single Undo step
Impact
- Print production: Items invisible in Preview mode may also be missing from PDF export or print output (not yet verified but likely given the correlation between Preview mode and print rendering).
- User confusion: Designers may not notice the issue until final proofing, as items appear normal in the default working view.
- Propagation: The issue spreads to any copies made from affected objects, making it difficult to isolate without programmatic diagnosis.
- Magazine production affected: The issue was discovered during production of a print magazine (folker magazine, issue 25-4), where FlexObject layouts are used for album review image grids.
Requested Fix
- Ensure that IDML import fully registers all reconstructed page items — including FlexObject containers and their children — in the spread's internal page item collection.
- Consider adding a document integrity check that detects and repairs unregistered page items on document open or IDML import.
- Verify that other new object types introduced alongside Flex Layout are also correctly handled during IDML roundtrips.
Environment
- InDesign version: 2025 (v20.x, latest available as of February 2026)
- OS: Windows
- Flex Layout feature: Enabled, actively used
- Document history: Created in InDesign → exported as IDML → reopened → saved as .indd
- Diagnosis performed with: ExtendScript via JSX execution (InDesign DOM scripting)
-
Stephan Möbius
commented
People affected can use this script as a temporary workaround to repair unregistered (disappearing) items in the activeDocument:
=========================================
/* Fix: FlexObject items invisible in Preview mode after IDML roundtrip
Cause: Items exist in page.allPageItems but not spread.allPageItems.
Fix: Cut → Paste-Into temp frame → Cut back out → Paste → restore bounds.
This forces InDesign to re-register items in the spread hierarchy.
Tested with InDesign 2025. Groups all changes into one Undo step. */(function () {
if (!app.documents.length) { alert("No document open."); return; }
var doc = app.activeDocument;// Detect unregistered top-level items
var affected = [];
for (var s = 0; s < doc.spreads.length; s++) {
var sp = doc.spreads[s];
var ids = {};
for (var k = 0; k < sp.allPageItems.length; k++) ids[sp.allPageItems[k].id] = 1;
for (var p = 0; p < sp.pages.length; p++) {
var pg = sp.pages[p];
for (var i = 0; i < pg.allPageItems.length; i++) {
var it = pg.allPageItems[i];
if (it.parent.constructor.name === "Spread" && !ids[it.id])
affected.push({ id: it.id, t: it.constructor.name,
st: it.appliedObjectStyle.name, pg: pg.name });
}
}
}
if (!affected.length) { alert("All items registered. No fix needed."); return; }var msg = affected.length + " unregistered item(s) found:\n";
for (var m = 0; m < affected.length; m++)
msg += " " + affected[m].t + " (ID " + affected[m].id
+ ") p." + affected[m].pg + " [" + affected[m].st + "]\n";
if (!confirm(msg + "\nFix now?")) return;// Apply fix
app.doScript(function () {
app.scriptPreferences.enableRedraw = false;
var fixed = 0, errs = [];for (var f = 0; f < affected.length; f++) {
try {
var target = findById(doc, affected[f].id);
if (!target) { errs.push("ID " + affected[f].id + " not found"); continue; }
var ob = target.geometricBounds.slice(0);
var pp = target.parentPage;app.selection = [target];
app.cut();var tmp = pp.rectangles.add({ geometricBounds:
[ob[0]-5, ob[1]-5, ob[2]+5, ob[3]+5] });
app.selection = [tmp];
app.pasteInto();var inner = firstChild(tmp);
if (!inner) { errs.push("ID " + affected[f].id + " inner fail"); tmp.remove(); continue; }app.selection = [inner];
app.cut();
tmp.remove();
app.paste();app.selection[0].geometricBounds = ob;
fixed++;
} catch (e) { errs.push("ID " + affected[f].id + ": " + e.message); }
}
app.scriptPreferences.enableRedraw = true;// Verify
var still = countBroken(doc);
var rpt = "Done. Fixed " + fixed + "/" + affected.length + "."
+ (still ? "\nStill broken: " + still : "\nAll items OK!");
if (errs.length) { rpt += "\nErrors:"; for (var e=0;e<errs.length;e++) rpt += "\n "+errs[e]; }
alert(rpt);
}, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT,
"Fix unregistered items");function findById(doc, id) {
for (var s = 0; s < doc.spreads.length; s++)
for (var p = 0; p < doc.spreads[s].pages.length; p++) {
var items = doc.spreads[s].pages[p].allPageItems;
for (var i = 0; i < items.length; i++)
if (items[i].id === id) return items[i];
}
return null;
}
function firstChild(c) {
for (var i = 0; i < c.allPageItems.length; i++) {
var ch = c.allPageItems[i];
if (ch.constructor.name !== "Image" && ch.parent.id === c.id) {
if (ch.constructor.name === "FlexObject") return ch;
return ch;
}
}
return null;
}
function countBroken(doc) {
var n = 0;
for (var s = 0; s < doc.spreads.length; s++) {
var sp = doc.spreads[s], ids = {};
for (var k = 0; k < sp.allPageItems.length; k++) ids[sp.allPageItems[k].id] = 1;
for (var p = 0; p < sp.pages.length; p++)
for (var i = 0; i < sp.pages[p].allPageItems.length; i++) {
var it = sp.pages[p].allPageItems[i];
if (it.parent.constructor.name === "Spread" && !ids[it.id]) n++;
}
}
return n;
}
})();