AEM 6.1 || currentStyle.<propertyName> is returning null in cq5 publisher | Community
Skip to main content
Level 2
January 15, 2016

AEM 6.1 || currentStyle.<propertyName> is returning null in cq5 publisher

  • January 15, 2016
  • 2 replies
  • 2238 views

I am using currentStyle Object to fetch the design dialog properties for a component.

${currentStyle.linkurl}

This is working fine in author but returning null in publisher. I have already seen the below given post, but no solution has been posted. Is anyone has come across any solution for this?

currentStyle.<propertyName> is returning null in cq5 publisher, which is working perfectly fine in author (I did post a comment but looks like this post has been marked for deletion)

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.forum__9rn2-i_checked_thatcqde__pi9o-hi_any_updat._s_1_tosp.html/forum__9rn2-i_checked_thatcqde.html#forum__9rn2-i_checked_thatcqde__pi9o-hi_any_updat

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

2 replies

kautuk_sahni
Community Manager
Community Manager
January 29, 2016

Please refer to following links for some help:-

Link:- http://stackoverflow.com/questions/30122158/currentstyle-propertyname-is-returning-null-in-cq5-publisher-which-is-working

//

  1. In preview/ publish mode fetch the design values via currentDesign.getJSON(), parse the value returned from that and then key into the values You want from the Json object.
  2. You may solve this by removing one line of code from your template head.js. if you are inheriting any template from one of the "/libs" ( sightly) page and there head.js will be having below line of code so you can just overlay head.js in your template and commented out below line of code.

if (wcmmode.disabled) { request.setAttribute(Packages.com.day.cq.wcm.api.components.ComponentContext. BYPASS_COMPONENT_HANDLING_ON_INCLUDE_ATTRIBUTE, true); }

Comment out this and everything was back to normal.

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Mani_kumar_
Community Advisor
Community Advisor
January 29, 2016
Check for the design nodes are properly replicated in publish