Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

CQ.WCM is undefined in AEM6.2 in mobile/tablet view

Avatar

Level 6

Hi All,

I have title/parsys multiple times in my component, title is visible and parsys is hidden, when title is clicked parsys content is visible and clicked again on title will hide parsys content. This is working fine in descktop view in AEM6.2

But same functionality is not working in mobile or tablet view. It is throwing below error

Error 1 : CQ.WCM undefined. 

Error 2 : Uncaught TypeError: Cannot read property 'getEditable' of undefined

Below is the code in js file.

console.log("CQ.WCM", CQ.WCM);

var parsysComp = CQ.WCM.getEditable(component);
          if (parsysComp)
          {
              parsysComp.hide();
          }
 

Any help is highly appreciated.

 

Thanks,

Pradeep

5 Replies

Avatar

Level 10

In desktop, are you verifying this in publish instance or author ?

As per me cq.wcm will not work in publish since its part of author clientlib and will not load in publish.

Avatar

Level 6

Hi,

I am verifying in Author. Didn't configure publish in my local. 

Avatar

Level 10

okay, that's the reason its working in desktop, 

my next question, in which mode (author/publish) you are verifying in mobile?

Avatar

Level 6

I am verifying in preview/edit mode, both are not working also tried in wcmmode=disabled in url. None worked 

Avatar

Level 1

We are also facing the same issue in AEM 6.1.(author instance). Did you get the solution? 

 geteditable('content2/jcr:content/par/component1'); when used in content1 is returning 'undefined'.

Thanks!!