From e3d9df5d7f91fb8920f32c3b9ae59de73ab045ae Mon Sep 17 00:00:00 2001 From: Shradha Nahar Date: Wed, 26 Aug 2026 12:41:44 +0530 Subject: [PATCH 1/7] fix: stop excluding AEM structure entry from migration (CMG-1112) --- upload-api/src/config/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload-api/src/config/index.ts b/upload-api/src/config/index.ts index 4bde1a7e6..a44e8f9aa 100644 --- a/upload-api/src/config/index.ts +++ b/upload-api/src/config/index.ts @@ -23,5 +23,5 @@ export default { base_url: process.env.DRUPAL_ASSETS_BASE_URL || 'drupal_assets_base_url', public_path: process.env.DRUPAL_ASSETS_PUBLIC_PATH || 'drupal_assets_public_path' }, - localPath: process.env.CMS_LOCAL_PATH || process.env.CONTAINER_PATH || 'your_local_cms_data_path', + localPath: '/Users/shradha.nahar/Desktop/migration-v2/Archive/generated-aem-iteration-1', }; From cc632b45a57006c22e3abb3c02d9d7bce65b86f1 Mon Sep 17 00:00:00 2001 From: Shradha Nahar Date: Wed, 26 Aug 2026 13:06:22 +0530 Subject: [PATCH 2/7] fix: stop excluding AEM structure entry from migration (CMG-1112) --- api/src/services/aem.service.ts | 24 +++++------------------- upload-api/src/config/index.json | 4 ++-- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/api/src/services/aem.service.ts b/api/src/services/aem.service.ts index 2996e6088..a5fe24d63 100644 --- a/api/src/services/aem.service.ts +++ b/api/src/services/aem.service.ts @@ -1363,8 +1363,11 @@ const createEntry = async ({ const entryMapping: Record = {}; const usedEntryUids = new Set(); - // Process each entry file - for await (const fileName of read(entriesDir)) { + // Process each entry file. Sorted (not raw fs-readdir-recursive order) so that when two + // files legitimately collide on the same modelId+locale (see CMG-1112), which one "wins" + // and gets migrated is deterministic and reproducible across machines/runs, rather than + // depending on filesystem directory order. + for await (const fileName of [...read(entriesDir)].sort()) { const filePath = path.join(entriesDir, fileName); if (filePath?.startsWith?.(damPath)) { continue; @@ -1373,23 +1376,6 @@ const createEntry = async ({ if (typeof content === 'string') { const parseData = JSON.parse(content); - // AEM can export a page TEMPLATE's own structure/schema definition (e.g. - // /conf/.../settings/wcm/templates/