I am working on a use case for overriding the content-aware configuration using OSGi configuration. It seems to be working perfectly fine on the development environment on the cloud. But the configuration does not override the value when it comes to the stage/production environment.
org.apache.sling.caconfig.impl.override.OsgiConfigurationOverrideProvider~pdf-viewer.cfg.json
Am I missing anything here?
Solved! Go to Solution.
Views
Replies
Total Likes
@Tanika02 @Himanshu_Jain @krati_garg @aanchal-sikka
Thank you, everyone, for reviewing the issue and coming up with ideas. Finally, we were able to sort it out. It was an issue with the asset path which was not rendering and the PDF viewer was failing.
There is no issue with the configuration.
Thanks,
Asutosh
Hello @Asutosh_Jena_
The configuration seems fine. After updating an Environment Variable, it takes some time on AaaCS to reflect.
Can you possibly check, if the "API_KEY" is configured for Stage And PROD as well on Cloud manager?
Hi @aanchal-sikka Yes I can confirm the deployment is completed but unfortunately, I do not see it working.
@Asutosh_Jena_ Can you please also mention the run mode you are using for Production environment here. Also, are you working upon AEMaaCS or Non Cloud version of AEM?
Hi @krati_garg
Below are the run modes we are using:
Development: config.dev
Staging: config.stage
Production: config.prod
I am pretty sure it's not with run modes as other configs from the same run modes work perfectly fine without any issue and also uses environment variable on cloud manager.
This is on AEM as Cloud.
Thanks,
Asutosh
Kindly rename your config
from
org.apache.sling.caconfig.impl.override.OsgiConfigurationOverrideProvider~pdf-viewer.cfg.json
to
org.apache.sling.caconfig.impl.override.OsgiConfigurationOverrideProvider-pdf-viewer.cfg.json
replace~ with- in your config name .
Thanks
Himanshu
This is a factory configuration and has to be used with ~
Also, this works in a development environment so I don't see this as an issue.
Thanks,
Asutosh
We faced this for one of our config in AEM cloud instance (stage/Prod) and we tried the same .
Also this was on one of the POD not on all PODs .
For more details check https://issues.apache.org/jira/browse/SLING-11855
Thanks
Himanshu
Hello @Asutosh_Jena_
Could you please confirm that the API_KEY environment variable is properly set in the stage/production environment. Check if it has the expected value or if the default value is being used. Ensure that the environment variable is accessible to the application at runtime.
@Tanika02 @Himanshu_Jain @krati_garg @aanchal-sikka
Thank you, everyone, for reviewing the issue and coming up with ideas. Finally, we were able to sort it out. It was an issue with the asset path which was not rendering and the PDF viewer was failing.
There is no issue with the configuration.
Thanks,
Asutosh
thanks for this post. To get more info
thanks for this post. To get more info
Views
Likes
Replies