Expand my Community achievements bar.

SOLVED

wcmmode not working in author

Avatar

Level 9

so I have these lines in my component

 

<p>wcmmode.edit: ${wcmmode.edit}</p>
<p>wcmmode.disabled: ${wcmmode.disabled}</p>

 

wcmmode.edit return false.

wcmmode.disabled returns true.

 

any ideas? thanks

EDIT: I checked the runmode and it's listing "author" as one of the runmodes.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Can you try installing AEM fiddle to your instance I think that can help you debug the issue

https://adobe-consulting-services.github.io/acs-aem-tools/features/aem-fiddle/index.html

View solution in original post

5 Replies

Avatar

Level 4

Hi @jayv25585659 

 

To get these values you have to append ?wcmmode=disabled or  ?wcmmode=edit in the URL.

please refer to below screenshots.

 

Gaurav_Sachdeva1_0-1675295613881.png

 

Gaurav_Sachdeva1_1-1675295648456.png

 

Thanks,

Gaurav

Avatar

Level 9

still not working. anymore more ideas? (can this be an OSGI config?)

Avatar

Correct answer by
Level 2

Can you try installing AEM fiddle to your instance I think that can help you debug the issue

https://adobe-consulting-services.github.io/acs-aem-tools/features/aem-fiddle/index.html

Avatar

Community Advisor

Hi @jayv25585659 ,

 

Just to double check you have 'editor.html' added to the author URL? 

 

Thanks,

Ritesh

Avatar

Level 1

Check if data-sly-resource="${@path=fragment.localizedFragmentVariationPath, selectors=selector, wcmmode='disabled'}" is present in your component. If so, below solution will help you.


In this instance, the last parameter, wcmmode='disabled' causes the component to return false to the value ${wcmmode.edit}.


To fix this, remove the wcmmode='disabled' from the data-sly-resource.

The following has evaluated to null or missing: ==> liql("SELECT id, subject, body, depth, post_time, author.login, author.id, author.rank, metrics.views FROM messages WHERE topic.id = '${topicId}' AND is_solution = true").data.items[0] [in template "analytics-container" at line 82, column 31] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign acceptedAnswer = liql("SELECT... [in template "analytics-container" at line 82, column 5] ----