acs-aem-commons icon indicating copy to clipboard operation
acs-aem-commons copied to clipboard

Multifield data isn't storing as JSON format in the page properties after service pack upgrade

Open sannyrach opened this issue 1 year ago • 0 comments

Required Information

AEM 6.5.14

  • [ ] ACS AEM Commons Version: 4.1.0
  • [ ] Reproducible on Latest? yes

Expected Behavior

Multifield data to be stored as JSON format for the page properties.

Actual Behavior

We have a a multi field added on the page properties using the below format. We expect it to store the data as a property called :options on the page jcr:node and that store the field values in JSON format. It used to work as expected before, but recently we had a service pack upgrade from 6.5.5 to 6.5.14 and we believe that is causing the data to store as individual properties and instead of json format. Below is the shared field that we use across our pages. The below works fine if we have the similar functionality implemented in component but not as a page property. we even tried to add the acs-commons-nested= JSON_STORE. But it didn't help. As it is being used across all the pages, Could you please help on any way that we can solve this?

Steps to Reproduce

I tried to replicate this in AEM 6.5.14 in we-retail project with below dialog fields:

<options
    jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/foundation/form/multifield"
    cq-msm-lockable="remoteOptions"
    fieldLabel="Options">
    <field
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/foundation/form/fieldset"
        name="./options"
        renderReadOnly="{Boolean}true"
        acs-commons-nested="JSON_STORE">
        <layout
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
        <items jcr:primaryType="nt:unstructured">
            <columns
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/foundation/container">
                <items jcr:primaryType="nt:unstructured">
                    <URL
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/foundation/form/textfield"
                        emptyText=""
                        fieldLabel="JS Path"
                        name="./URL"/>
                    <useRequire
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/foundation/form/checkbox"
                        name="./isRequire"
                        text="Use JS"/>
                </items>
            </columns>
        </items>
    </field>
</options>

Please find attachment of the we-retail dialog where I am able to replicate the issue. we-retail-multifield-issue-json-storage-1.1 (1).zip

Links

Links to related assets, e.g. content packages containing test components

sannyrach avatar Dec 04 '23 19:12 sannyrach