Externalizer configuration values are not working AEM cloud Environment | Community
Skip to main content
July 30, 2023

Externalizer configuration values are not working AEM cloud Environment

  • July 30, 2023
  • 3 replies
  • 3580 views

Hi Team,

I create Externalizer configuration kept in config.publish folder , then i override that value through  AEM cloud environment variables , Its not pick whatever authored in environment config value 


// Configuration created by Apache Sling JCR Installer
{
"externalizer.domains":[
"local $[env:AEM_EXTERNALIZER_LOCAL;default=http://localhost:4502]",
"author $[env:AEM_EXTERNALIZER_AUTHOR;default=http://localhost:4502]",
"publish $[env:AEM_EXTERNALIZER_PUBLISH;default=http://localhost:4504]",
"preview $[env:AEM_EXTERNALIZER_PREVIEW;default=http://localhost:4503]",
""
]
}
@briankasingli  @aanchal-sikka  @estebanbustamante  @nishant-singh  @dprakashraj.  @sady_rifat 

 

3 replies

DPrakashRaj
Community Advisor
Community Advisor
July 30, 2023

How do you know that CM values are not being picked up? Is it falling back to default value from OSGI config?

once you add/update the CM values it take some time to get it updated on the environment approx 15 min.

July 30, 2023

@dprakashraj  Configured  CM values updated after that only tested but still take's only corresponding publish URL.

DPrakashRaj
Community Advisor
Community Advisor
July 30, 2023

Is it taking http://localhost:4504 ?

aanchal-sikka
Community Advisor
Community Advisor
July 31, 2023

Hello @bsr78033597 

 

1. Please validate the configs locally, to verify that the config file has no issues. Also, please remove the extra "" in externalizer.domains

 

2. Once we have the configs in, we also need to make sure, we use the right API

 

@Reference Externalizer externalizer; Externalizer externalizer = resourceResolver.adaptTo(Externalizer.class); externalizer.publishLink(resolver, "/my/page") + ".html"; externalizer.authorLink(resolver, "/my/page") + ".html";

 

 

Aanchal Sikka
August 2, 2023

thanks @aanchal-sikka 
I set those environment variables through the command line local instance it's working fine.
But when we add those environments variables AEM cloud environment configuration, it's not picking values.


August 23, 2024

hi @naruk89179065 , did you find any solution to this? facing the same issue

VeenaVikraman
Community Advisor
Community Advisor
October 30, 2024

I  am also  facing the same issue. The configurations given are not working as expected. It is only taking the URL of the server. Anyone else facing similar issue.

narendiran_ravi
October 30, 2024

Follow the approaches below:

  1. Update Environment Variables in Cloud Manager:

    • To override publish and preview domains, adjust the AEM_CDN_DOMAIN_PUBLISH and AEM_CDN_DOMAIN_PREVIEW environment variables directly in Cloud Manager.
  2. Use Custom Environment Variables:

    • Define custom variables (e.g., CUSTOM_EXTERNALIZER_PUBLISH) instead of using the reserved AEM_EXTERNALIZER_PUBLISH.

Note: The second option also works fine when I tried but may cause unpredictable application behavior according to the Adobe Experience Manager documentation,
I have not faced any issues so far.