Expand my Community achievements bar.

Multifield on page properties after inheritance on Live copy pages

Avatar

Level 2

I have a Multifield on page properties on english(blueprint page). french page is the live copy of en page. On french page the multifield is inherited from en page. Multifield is having 3 fields: a single selectable dropdown, multiselect dropdown and a text field. The chain icon is added as the last item in the fieldset. If I click on chain icon to cancel the inheritance. I am unable to cancel the inheritance. Did anybody else has also faced this issue or is there any limitation on this from aem side? 

7 Replies

Avatar

Level 2

Here is the sample code for same.

<hreflangSettings cq:showOnCreate="{Boolean}false"
jcr:primaryType="nt:unstructured" jcr:title="HrefLang Settings"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<hreflang granite:class="foundation-layout-util-maximized-alt"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
fieldDescription="Click 'Add Field' to add a set of hreflang for one domain alternate url"
composite="{Boolean}true"
renderReadOnly="{Boolean}true">
<field jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./hrefLang">
<items jcr:primaryType="nt:unstructured">
<well jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/well">
<items jcr:primaryType="nt:unstructured">
<language granite:class="language" jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
emptyText="Select" fieldLabel="Language" name="./language"
renderReadOnly="{Boolean}true" required="{Boolean}true"
translateOptions="{Boolean}true">
<granite:data jcr:primaryType="nt:unstructured"
cq-msm-lockable="jcr:language" />
<datasource jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/dropdownPopulator" addNone="{Boolean}true"
dropdownSelector="languageList"/>
</language>
<countries granite:class="countries"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
emptyText="Select" fieldLabel="Countries" multiple="{Boolean}true"
name="./countries" renderReadOnly="{Boolean}true"
translateOptions="{Boolean}true">
<granite:data jcr:primaryType="nt:unstructured"
cq-msm-lockable="jcr:countries" />
<datasource jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/dropdownPopulator" addNone="{Boolean}true"
dropdownSelector="countryList"/>
</countries>
<domainalturl jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Alternate URL" name="./domainUrl" value="" />
</items>
</well>
</items>
</field>
</hreflang>
</items>
</hreflangSettings>

 

 

If I delete the multiselect countries dropdown from the multifield fieldset  I am able to cancel the inheritance. Is there any issue on multiselect dropdown here. Any help will really be appreciated.

Avatar

Community Advisor

Hi @maans,

cq-msm-lockable property (that is responsible for the lock icon on live copy pages) should have the value same as that of your field name property. 

In this case,

  • if your multiselect dropdown field name is ./countries, then cq-msm-locable property should be countries
  • Same with language field too. 

Avatar

Level 1

Hi @Vijayalakshmi_S ,

 

Adding cq-msm-lockable property as mentioned didn't resolve the issue.

 

Please find the below code:

 

<addpopup
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldLabel="Add Pop-up">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
name="./popup"
translatable="{Boolean}false">
<items jcr:primaryType="nt:unstructured">
<title_popupMulti
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Pop-up Content Title"
name="./title_popupMulti"
required="{Boolean}true"

translatable="{Boolean}true">
</title_popupMulti>
<urls_popupMulti
cq:showOnCreate="{Boolean}true"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
fieldLabel="URLs to Receive Pop-up Content">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
name="./urls_popupMulti"
rootPath="/content/mdt"
translatable="{Boolean}false"/>
</urls_popupMulti>
<button_popupMulti
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
emptyText="Continue"
fieldLabel="Button Text for Pop-up Notification"
name="./button_popupMulti"
required="{Boolean}true"
value="Continue"

translatable="{Boolean}true">
</button_popupMulti>
</items>
</field>
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="popup"/>
</addpopup>

 

 

The above code lets me break the chain and edit the live copy page properties but a rollout is overwriting those changes and replacing with the values from master copy/blueprint.

 

Please let me know if there's any other way to fix this issue. Thanks!!

 

Avatar

Level 10

I see a similar issue as well .. please let me know if this is a known issue

Avatar

Level 10

@maans @Sri1 

were you able to fix the inheritance issue? The live copies still inherit on rollout even if inheritance is disabled 

Avatar

Level 1

I'm having this same issue. I've noticed that when I define a cq-msm-lockable using the "Absolute path" strategy "/example", will correclty apply the "cq:isCancelledForChildren" property to "jcr:content/example".
However, when I actually make a change to the multifield and save, the MSM generated properties/mixins are deleted as the entire "example" node is rewritten by the multifield. 

 

It seems to me, that in order to get multifields to properly work witih MSM inheritance OOTB, the multifield needs to be refactored to incorporate granite MSM functionality. It needs to respect the cq-msm-lockable attribute when submitting composite multifield values via a Page Properties dialog.

 

Fortunately, this works fine for basic 1-field multifields where the values are stored in a String[] property.

I suspect that if I rewrite my multifield to use JSON instead of nested JCR nodes, that a "Relative" cq-msm-lockable attribute would suffice. It's just really difficult to plan that when you're weeks away from launching your site and this issue had not been detected by us until now. 

Avatar

Level 10

Yes , raised concern with adobe and it appears that it is not something they have available and will be a customization 

I ended up writing code but it is prone to issues with inheritance