Custom namespace getting modified when content copy from higher to lower environment in AEM CS | Community
Skip to main content
Level 2
March 4, 2026
Question

Custom namespace getting modified when content copy from higher to lower environment in AEM CS

  • March 4, 2026
  • 1 reply
  • 3 views

Hi,

 

We are facing an issue while copying the content from Prod to Stage / Dev in AEM CS. We are using content copy option in Cloud manager to do so. The custom namespace  we created are getting changed from  abc:assetID to abc0:assetID this is causing an issue for the few functionalities where we are using these metadata(s).

 

Please suggest the way to fix the issue. 

TIA.

    1 reply

    giuseppebaglio
    Level 10
    March 4, 2026

    hi ​@ShikhaSharma-1,

    When the Content Copy tool copies content from Prod to Stage/Dev, the target environment's JCR repository may already have a namespace registered under the same URI. When Oak detects a collision, it automatically remaps the prefix by appending a numeric suffix — so abc becomes abc0, abc1. 

    The Adobe-recommended approach for AEM as a Cloud Service is to register custom namespaces via Sling Repository Initialization (repoinit) scripts deployed as OSGi configurations. This ensures the namespace is consistently registered with the same prefix and URI across all environments before any content copy occurs.

     

    Here my suggestion:

    1. Audit current namespaces across all environments via CRXDE Lite → /crx/explorer/index.jsp → Node Type Administration → Namespaces. Ensure the abc prefix maps to the same URI on every environment.
    2. Add a repoinit OSGi config (as shown above) to your ui.config module in your AEM project to register the namespace consistently.
    3. Deploy the code to all environments (Dev, Stage, Prod) via Cloud Manager pipeline before re-running the content copy.
    4. Re-run the content copy without namespaces
    5. Fix existing corrupted metadata — for assets already copied with the abc0:assetID prefix, you may need a Groovy console script or a custom migration script to rename the properties back to abc:assetID.