Please refer to following links for some help:-
Link:- http://stackoverflow.com/questions/30122158/currentstyle-propertyname-is-returning-null-in-cq5-publi...
//
- 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.
- 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