Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
451 stars 597 forks source link

Touch UI Multifield JSON Store not saving content for RTE #745

Closed cameronoxley closed 6 years ago

cameronoxley commented 8 years ago

Hi Guys, I'm using acs-commons 2.5.0 with AEM 6.1 SP1.

I'm trying to use the touch-ui-composite-multifield example to store content within a RichText Editor into the CRX as JSON.

My cq:Dialog:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"
          xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
          jcr:primaryType="nt:unstructured"
          jcr:title="Hide Reveal"
          sling:resourceType="cq/gui/components/authoring/dialog"
          helpPath="https://docs.adobe.com/docs/en/aem/6-1/author/page-authoring/editing-content.html"
          width="40rem"
          height="30rem">
    <content
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/foundation/container">
        <layout
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/foundation/layouts/tabs"
                type="nav"/>
        <items jcr:primaryType="nt:unstructured">
            <headerTab
                    jcr:primaryType="nt:unstructured"
                    jcr:title="Header"
                    sling:resourceType="granite/ui/components/foundation/section">
                <layout
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
                        margin="{Boolean}false"/>
                <items jcr:primaryType="nt:unstructured">
                    <column
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/foundation/container">
                        <items jcr:primaryType="nt:unstructured">
                            <title
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/foundation/form/textfield"
                                    fieldLabel="Title"
                                    name="./title"/>
                            <subtitle
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/foundation/form/textfield"
                                    fieldLabel="Description"
                                    name="./description"/>
                        </items>
                    </column>
                </items>
            </headerTab>
            <accordionTab
                    jcr:primaryType="nt:unstructured"
                    jcr:title="Content"
                    sling:resourceType="granite/ui/components/foundation/container">
                <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">
                            <definitions
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/foundation/form/multifield"
                                    class="foundation-layout-util-maximized-alt"
                                    fieldLabel="Accordions">
                                <field
                                        jcr:primaryType="nt:unstructured"
                                        sling:resourceType="granite/ui/components/foundation/form/fieldset"
                                        acs-commons-nested="JSON_STORE"
                                        name="./accordionItems">
                                    <layout
                                            jcr:primaryType="nt:unstructured"
                                            sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
                                            method="absolute"/>
                                    <items jcr:primaryType="nt:unstructured">
                                        <column jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/foundation/container">
                                            <items jcr:primaryType="nt:unstructured">
                                                <heading
                                                        jcr:primaryType="nt:unstructured"
                                                        sling:resourceType="granite/ui/components/foundation/form/textfield"
                                                        fieldLabel="Heading"
                                                        name="./heading"
                                                        required="{Boolean}true"/>
                                                <subheading
                                                        jcr:primaryType="nt:unstructured"
                                                        sling:resourceType="granite/ui/components/foundation/form/textfield"
                                                        fieldLabel="Subheading"
                                                        name="./subheading"/>
                                                <content
                                                        jcr:primaryType="nt:unstructured"
                                                        sling:resourceType="cq/gui/components/authoring/dialog/richtext"
                                                        height="100"
                                                        emptyText="Content"
                                                        name="./content"
                                                        useFixedInlineToolbar="{Boolean}true">
                                                    <rtePlugins jcr:primaryType="nt:unstructured">
                                                        <format
                                                                jcr:primaryType="nt:unstructured"
                                                                features="*"/>
                                                        <justify
                                                                jcr:primaryType="nt:unstructured"
                                                                features="*"/>
                                                        <lists
                                                                jcr:primaryType="nt:unstructured"
                                                                features="*"/>
                                                        <paraformat
                                                                jcr:primaryType="nt:unstructured"
                                                                features="*"/>
                                                        <links
                                                                jcr:primaryType="nt:unstructured"
                                                                features="*"/>
                                                    </rtePlugins>
                                                    <uiSettings jcr:primaryType="nt:unstructured">
                                                        <cui jcr:primaryType="nt:unstructured">
                                                            <inline
                                                                    jcr:primaryType="nt:unstructured"
                                                                    toolbar="[#format,#paraformat,image#imageProps,#justify,#lists,links#modifylink,links#unlink]">
                                                                <popovers jcr:primaryType="nt:unstructured">
                                                                    <format
                                                                            jcr:primaryType="nt:unstructured"
                                                                            items="[format#bold,format#italic,format#underline]"
                                                                            ref="format"/>
                                                                    <justify
                                                                            jcr:primaryType="nt:unstructured"
                                                                            items="[justify#justifyleft,justify#justifycenter,justify#justifyright]"
                                                                            ref="justify"/>
                                                                    <lists
                                                                            jcr:primaryType="nt:unstructured"
                                                                            items="[lists#unordered,lists#ordered,lists#outdent,lists#indent]"
                                                                            ref="lists"/>
                                                                    <paraformat
                                                                            jcr:primaryType="nt:unstructured"
                                                                            items="paraformat:getFormats:paraformat-pulldown"
                                                                            ref="paraformat"/>
                                                                </popovers>
                                                            </inline>
                                                        </cui>
                                                    </uiSettings>
                                                </content>
                                            </items>
                                        </column>
                                    </items>
                                </field>
                                <fieldType
                                        jcr:primaryType="nt:unstructured"
                                        sling:resourceType="granite/ui/components/foundation/form/hidden"
                                        name="./accordionItems@TypeHint"
                                        value="String[]"/>
                            </definitions>
                        </items>
                    </columns>
                </items>
            </accordionTab>
            <column
                    jcr:primaryType="nt:unstructured"
                    sling:hideResource="{Boolean}true"/>
        </items>
    </content>
</jcr:root>

Everything is populated in the ./accordionItems section of the CRX, however the content section is always blank:

{"heading":"Heading 1","subheading":"Subheading 1","content":""},{"heading":"Heading 2","subheading":"Subheading 2","content":""}

Prior to the SP1 update the content was being saved from the RTE into the CRX.

Please could you assist.

cameronoxley commented 8 years ago

I also used the example given in the js file and added the RTE without any additional settings to make sure.

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
          jcr:primaryType="nt:unstructured"
          jcr:title="ACS AEM Commions Multifield TouchUI Component"
          sling:resourceType="cq/gui/components/authoring/dialog"
          helpPath="en/cq/current/wcm/default_components.html#Text">
    <content jcr:primaryType="nt:unstructured"
             sling:resourceType="granite/ui/components/foundation/container">
        <layout jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
        <items jcr:primaryType="nt:unstructured">
            <column jcr:primaryType="nt:unstructured"
                    sling:resourceType="granite/ui/components/foundation/container">
                <items jcr:primaryType="nt:unstructured">
                    <fieldset jcr:primaryType="nt:unstructured"
                              jcr:title="Sample Dashboard"
                              sling:resourceType="granite/ui/components/foundation/form/fieldset">
                        <layout jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
                        <items jcr:primaryType="nt:unstructured">
                            <column jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <dashboard jcr:primaryType="nt:unstructured"
                                               sling:resourceType="granite/ui/components/foundation/form/textfield"
                                               fieldDescription="Enter Dashboard name"
                                               fieldLabel="Dashboard name"
                                               name="./dashboard"/>
                                    <pages jcr:primaryType="nt:unstructured"
                                           sling:resourceType="granite/ui/components/foundation/form/multifield"
                                           class="full-width"
                                           fieldDescription="Click '+' to add a new page"
                                           fieldLabel="Pages">
                                        <field jcr:primaryType="nt:unstructured"
                                               sling:resourceType="granite/ui/components/foundation/form/fieldset"
                                               acs-commons-nested="JSON_STORE"
                                               name="./pages">
                                            <layout jcr:primaryType="nt:unstructured"
                                                    sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
                                                    method="absolute"/>
                                            <items jcr:primaryType="nt:unstructured">
                                                <column jcr:primaryType="nt:unstructured"
                                                        sling:resourceType="granite/ui/components/foundation/container">
                                                    <items jcr:primaryType="nt:unstructured">
                                                        <page jcr:primaryType="nt:unstructured"
                                                              sling:resourceType="granite/ui/components/foundation/form/textfield"
                                                              fieldDescription="Name of Page"
                                                              fieldLabel="Page Name"
                                                              name="./page"/>
                                                        <path jcr:primaryType="nt:unstructured"
                                                              sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
                                                              fieldDescription="Select Path"
                                                              fieldLabel="Path"
                                                              name="./path"
                                                              rootPath="/content"/>
                                                        <content
                                                               jcr:primaryType="nt:unstructured"
                                                               sling:resourceType="cq/gui/components/authoring/dialog/richtext"
                                                               height="100"
                                                               emptyText="Content"
                                                               name="./content"
                                                               useFixedInlineToolbar="{Boolean}true"/>
                                                    </items>
                                                </column>
                                            </items>
                                        </field>
                                    </pages>
                                </items>
                            </column>
                        </items>
                    </fieldset>
                </items>
            </column>
        </items>
    </content>
</jcr:root>
stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.