WCMMode disabled is incorrect in publisher | Community
Skip to main content
Level 5
December 3, 2021

WCMMode disabled is incorrect in publisher

  • December 3, 2021
  • 3 replies
  • 3886 views

Hi all,

 

Our AEM 6.5 publisher cannot detect the correct WCMMode. The start script runs with an option "

-Dsling.run.modes=publish,dev,crx3,crx3tar,nosamplecontent". 

JSP code segment:

boolean isWcmDisabled = WCMMode.fromRequest(request) == WCMMode.DISABLED;

The isWcmDisabled is false in publisher, should be true. Now all the wrong preloads are coming up. 

 

It is working on AEM 6.0. Any idea?

 

Thanks!

 

-kt

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Manu_Mathew_
Community Advisor
Community Advisor
December 3, 2021

@kevin_gta 

Are you using any service packs?

Please try intsalling the service packs.

Kevin_GTaAuthor
Level 5
December 3, 2021

@manu_mathew_ 

 

Thanks for your instruction. I don't have the permission to download the service pack. Will try that and see what will happen.

 

Thanks again!

Asutosh_Jena_
Community Advisor
Community Advisor
December 3, 2021

Hi @kevin_gta 

 

Please stop the instance.

 

Update the start script with the below line:

 

if [ -z "$CQ_RUNMODE" ]; then
CQ_RUNMODE='publish,dev,crx3,crx3tar,nosamplecontent'
fi

 

Start the instance and it should fix the issue.

 

Thanks!

Kevin_GTaAuthor
Level 5
December 3, 2021

It has been like that. Doesn't look like coming from the line of code.

joerghoh
Adobe Employee
Adobe Employee
December 4, 2021

What is the return value of

WCMMode.fromRequest(request)

 

Kevin_GTaAuthor
Level 5
December 5, 2021

Hi @joerghoh , it's the default value "dev, s7connect, crx3, author, samplecontent, crx3tar". Both java and jsp code are showing the same value on author and publisher.  The process shows the instance is using the custom runmodes:

ps -ef | grep -i java

 

java -server -Xms1024m -Xmx2048m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=2048m -javax.net.ssl.trustStore=/apps/mysite/crx-quickstart/ssl/trusted.keystore -Djava.awt.headless=true -Xverify:none -noverify -Dsling.run.modes=publish,dev,crx3,crx3tar,nosamplecontent -jar crx-quickstart/app/cq-quickstart-6.5.0-standalone-quickstart.jar start -c crx-quickstart -i launchpad -p 4503 -Dsling.properties=conf/sling.properties

 

The author process shows the same, except one of the runmodes is author instead of publish. It's weird that the geometrixx is not installed even if the runmodes show samplecontent. Somehow the instance is started with custom runmodes but get altered after starting up? conf/sling.properties file doesn't have anything related to runmodes.

 

Thanks!

joerghoh
Adobe Employee
Adobe Employee
December 7, 2021

The wcmmode is not necessarily tied to the runmode(s); the only relevant change is the runmode during the installation (initial startup), where based on runmodes packages or configuration could be installed.

That means if you set the runmode "nosamplecontent" after having bootstrapped an AEM instance, it does not have any effect.

 

Regarding the WcmMode: Can you find out what the actual WcmMode is returned by the code snippet you posted? We just know that it is not "WcmMode.DISABLED".