Change a multivalued property with the editproperties sync action
Hello,
We have a multisite setup, where one of the sites is a mobile version of another site. The mobile site is a livecopy from the desktop version. We are using an EditProperties sync action to modify the components and templates in the mobile site to their mobile counterparts, just like in the geometrix example site. This works fine.
The only problem is we are not able to modify the 'cq:allowedTemplates' property to contain the mobile versions of the templates. I'm trying something like this:
cq:allowedTemplates#/apps/kpngb-whitelabel/templates/contentpage#/apps/kpngb-whitelabel/templates/mobile/contentpage
But then I get the following exception when performing a roll-out:
Caused by: javax.jcr.ValueFormatException: property /content/kpngb-base-mobile/en/jcr:content/cq:allowedTemplates is a multi-valued property, so it's values can only be retrieved as an array
at org.apache.jackrabbit.core.PropertyImpl.internalGetValue(PropertyImpl.java:483)
at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:510)
at org.apache.jackrabbit.core.PropertyImpl.getString(PropertyImpl.java:520)
at com.day.cq.wcm.msm.impl.actions.PropertyEditor.editNode(PropertyEditor.java:95)
at com.day.cq.wcm.msm.impl.actions.EditPropertiesActionFactory$EditPropertiesAction.doExecute(EditPropertiesActionFactory.java:101)
at com.day.cq.wcm.msm.impl.actions.BaseAction.execute(BaseAction.java:53)
... 99 more
So my question is:
*) is it possible to change a multivalued property like cq:allowedTemplates with the EditProperties sync action
--) if it is, then what is the syntax of the replacement expression
--) if it is not, is there another way to do this (I suppose by writing a custom LiveAction?)
Kind regards,
Luc Feys