April 25, 2020
Estimated Post Reading Time ~

Mode Design issue AEM 6.1 Touch UI

In this post, you can find a brief summary of a known issue on AEM 6.1 Touch UI and how you can resolve it.

Are you were already using wcmmode global object to check if the user is on design mode to hide/enable functionality?

When you changed to AEM 6.1 version and start using the Touch UI to go to the design mode… did you noticed that the wcmmode.design value is always false no matter if you are on Edit or Design mode?.

If the answer is YES, this post is definitely for you!

The problem:
In Touch UI the mode isn’t stored in the global object wcmmode, it’s saved on a regular cookie.

wcmmode example using Classic UI


wcmmode using Touch UI


Cookies stored (design value example)


Cookies stored (edit value example)


Proposed solution:
A workaround for this it’s to create a JavaScript file using the JavaScript Use-API like the following example:


Note: the validation using the isEditMode it’s needed when the user uses the query string ?wcmmode=disabled but the cookie still has the value design




By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.