Expand my Community achievements bar.

Context-Aware Configuration getting Null in the STG environment

Avatar

Level 1
Level 1

Context-Aware Configuration under Experience fragments are getting null in the STG environment but it's working in DEV and local environments. The content structure is the same in all environments.

 

ResourceResolver serviceResolver = Utils.getResourceResolver(resolverFactory,SUB_SERVICE);//Getting Resource Resolver for SUBSERVICE
Resource contentResource = serviceResolver.getResource(path);
WorkFlowCaConfig config = contentResource.adaptTo(ConfigurationBuilder.class).as(WorkFlowCaConfig.class);

contentResource also gets null.

 

Thanks

4 Replies

Avatar

Level 4

Hi ,

can you please confirm if serviceResolver is not null and system user is good in staging ?

 

Thanks

Avatar

Level 1
Level 1

Thanks for the reply, serviceResolver is not null and the system user is already present in STG, the same code is working pages, assets, etc.

Avatar

Community Advisor

@j1d  can you check if the path is available in Stage?

 And also the system user have enough permission same as dev 

Avatar

Community Advisor

check if you are missing any environmental level configurations.