Environment
- agility-cli version: 1.0.0-beta.13.28
Summary
When syncing pages between two Agility CMS instances using the CLI, the order of components (modules) within a page's content zone is not preserved. Modules can end up reordered on the target instance, changing how the page renders.
Example
A page synced from a source instance to a target instance had a content zone containing two modules, e.g. ModuleA and ModuleB.
Source page zone:
"main-content-zone": [
{ "title": "Module A", "module": "ModuleA", "item": { "contentid": 111 } },
{ "title": "Module B", "module": "ModuleB", "item": { "contentid": 222 } }
]
Target page zone (after sync):
"main-content-zone": [
{ "title": "Module B", "module": "ModuleB", "item": { "contentid": 333 } },
{ "title": "Module A", "module": "ModuleA", "item": { "contentid": 444 } }
]
The order of ModuleA and ModuleB is swapped between source and target. Zone names, module names, and all other page metadata match as expected — only the ordering within the zone differs.
Impact
Any page whose content zones contain two or more modules is potentially affected, since the relative order of modules controls page rendering order. In our audit of ~112 synced pages, 14 pages had zones with reordered modules after sync — so this isn't universal, but it's also not an isolated one-off; it appears whenever a zone has multiple modules.
Expected behavior
The sync process should preserve the exact order of modules within each content zone as defined on the source instance.
Suggested diagnostic approach
For each synced page pair (source/target), compare the list of module values per zone. A defect is present when sorted(source_modules) == sorted(target_modules) but source_modules != target_modules (same modules present, different order).
Environment
Summary
When syncing pages between two Agility CMS instances using the CLI, the order of components (modules) within a page's content zone is not preserved. Modules can end up reordered on the target instance, changing how the page renders.
Example
A page synced from a source instance to a target instance had a content zone containing two modules, e.g.
ModuleAandModuleB.Source page zone:
Target page zone (after sync):
The order of
ModuleAandModuleBis swapped between source and target. Zone names, module names, and all other page metadata match as expected — only the ordering within the zone differs.Impact
Any page whose content zones contain two or more modules is potentially affected, since the relative order of modules controls page rendering order. In our audit of ~112 synced pages, 14 pages had zones with reordered modules after sync — so this isn't universal, but it's also not an isolated one-off; it appears whenever a zone has multiple modules.
Expected behavior
The sync process should preserve the exact order of modules within each content zone as defined on the source instance.
Suggested diagnostic approach
For each synced page pair (source/target), compare the list of
modulevalues per zone. A defect is present whensorted(source_modules) == sorted(target_modules)butsource_modules != target_modules(same modules present, different order).