2

I try to configure a dialog with a Multivalue field containing a composite field.

However, I get the following error:

Invocation of method buttonClick in info.magnolia.ui.form.field.MultiField$1 failed.

Adriano
  • 19,463
  • 19
  • 103
  • 140

1 Answers1

3

As pointed out in a similar question on Magnolia Forum, the issue was in the configuration tree.

I had 2 configuration nodes at an incorrect level of the dialog's tree.

It's pretty deep so one must watch out for misconfiguration.


Solution:

Dialog config tree exported

<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="tabEvents" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>mgnl:contentNode</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:uuid" sv:type="String">
    <sv:value>90ad1aeb-ea0c-448b-b323-c727d6a47fc9</sv:value>
  </sv:property>
  <sv:property sv:name="jcr:createdBy" sv:type="String">
    <sv:value>admin</sv:value>
  </sv:property>
  <sv:property sv:name="label" sv:type="String">
    <sv:value>Events</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
    <sv:value>false</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:created" sv:type="Date">
    <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:createdBy" sv:type="String">
    <sv:value>superuser</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
    <sv:value>2016-10-18T16:15:34.891+02:00</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
    <sv:value>superuser</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:lastModified" sv:type="Date">
    <sv:value>2016-10-18T16:16:13.118+02:00</sv:value>
  </sv:property>
  <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
    <sv:value>superuser</sv:value>
  </sv:property>
  <sv:node sv:name="fields">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>mgnl:contentNode</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:uuid" sv:type="String">
      <sv:value>c28bd951-0455-4fa8-a373-0d837c21e6c7</sv:value>
    </sv:property>
    <sv:property sv:name="jcr:createdBy" sv:type="String">
      <sv:value>admin</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
      <sv:value>false</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:created" sv:type="Date">
      <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:createdBy" sv:type="String">
      <sv:value>superuser</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
      <sv:value>2016-10-18T16:15:34.892+02:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
      <sv:value>superuser</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastModified" sv:type="Date">
      <sv:value>2016-10-18T16:15:43.016+02:00</sv:value>
    </sv:property>
    <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
      <sv:value>superuser</sv:value>
    </sv:property>
    <sv:node sv:name="events">
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>mgnl:contentNode</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:uuid" sv:type="String">
        <sv:value>e778e569-0def-4416-8db3-c827c01229bf</sv:value>
      </sv:property>
      <sv:property sv:name="class" sv:type="String">
        <sv:value>info.magnolia.ui.form.field.definition.MultiValueFieldDefinition</sv:value>
      </sv:property>
      <sv:property sv:name="jcr:createdBy" sv:type="String">
        <sv:value>admin</sv:value>
      </sv:property>
      <sv:property sv:name="label" sv:type="String">
        <sv:value>Events</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
        <sv:value>false</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:created" sv:type="Date">
        <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:createdBy" sv:type="String">
        <sv:value>superuser</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
        <sv:value>2016-10-18T16:15:34.892+02:00</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
        <sv:value>superuser</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:lastModified" sv:type="Date">
        <sv:value>2016-10-18T16:16:30.044+02:00</sv:value>
      </sv:property>
      <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
        <sv:value>superuser</sv:value>
      </sv:property>
      <sv:property sv:name="transformerClass" sv:type="String">
        <sv:value>info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodePropertiesTransformer</sv:value>
      </sv:property>
      <sv:node sv:name="field">
        <sv:property sv:name="jcr:primaryType" sv:type="Name">
          <sv:value>mgnl:contentNode</sv:value>
        </sv:property>
        <sv:property sv:name="jcr:uuid" sv:type="String">
          <sv:value>696d2cb1-58a4-4851-a167-253b8a47ca72</sv:value>
        </sv:property>
        <sv:property sv:name="class" sv:type="String">
          <sv:value>info.magnolia.ui.form.field.definition.CompositeFieldDefinition</sv:value>
        </sv:property>
        <sv:property sv:name="jcr:createdBy" sv:type="String">
          <sv:value>admin</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
          <sv:value>false</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:created" sv:type="Date">
          <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:createdBy" sv:type="String">
          <sv:value>superuser</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
          <sv:value>2016-10-18T16:15:34.892+02:00</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
          <sv:value>superuser</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:lastModified" sv:type="Date">
          <sv:value>2016-10-18T16:15:56.610+02:00</sv:value>
        </sv:property>
        <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
          <sv:value>superuser</sv:value>
        </sv:property>
        <sv:property sv:name="transformerClass" sv:type="String">
          <sv:value>info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer</sv:value>
        </sv:property>
        <sv:node sv:name="fields">
          <sv:property sv:name="jcr:primaryType" sv:type="Name">
            <sv:value>mgnl:contentNode</sv:value>
          </sv:property>
          <sv:property sv:name="jcr:uuid" sv:type="String">
            <sv:value>283d22e5-add7-4183-a11d-d93976cd15e0</sv:value>
          </sv:property>
          <sv:property sv:name="jcr:createdBy" sv:type="String">
            <sv:value>admin</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
            <sv:value>false</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:created" sv:type="Date">
            <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:createdBy" sv:type="String">
            <sv:value>superuser</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
            <sv:value>2016-10-18T16:15:34.892+02:00</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
            <sv:value>superuser</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:lastModified" sv:type="Date">
            <sv:value>2016-10-18T16:15:56.610+02:00</sv:value>
          </sv:property>
          <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
            <sv:value>superuser</sv:value>
          </sv:property>
          <sv:node sv:name="eventName">
            <sv:property sv:name="jcr:primaryType" sv:type="Name">
              <sv:value>mgnl:contentNode</sv:value>
            </sv:property>
            <sv:property sv:name="jcr:uuid" sv:type="String">
              <sv:value>122bcb52-6d85-4fcc-b8e3-ea7ab531f8f5</sv:value>
            </sv:property>
            <sv:property sv:name="class" sv:type="String">
              <sv:value>info.magnolia.ui.form.field.definition.TextFieldDefinition</sv:value>
            </sv:property>
            <sv:property sv:name="jcr:createdBy" sv:type="String">
              <sv:value>admin</sv:value>
            </sv:property>
            <sv:property sv:name="label" sv:type="String">
              <sv:value>Name</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
              <sv:value>false</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:created" sv:type="Date">
              <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:createdBy" sv:type="String">
              <sv:value>superuser</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
              <sv:value>2016-10-18T16:15:34.894+02:00</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
              <sv:value>superuser</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastModified" sv:type="Date">
              <sv:value>2016-10-18T16:17:32.365+02:00</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
              <sv:value>superuser</sv:value>
            </sv:property>
          </sv:node>
          <sv:node sv:name="eventArtists">
            <sv:property sv:name="jcr:primaryType" sv:type="Name">
              <sv:value>mgnl:contentNode</sv:value>
            </sv:property>
            <sv:property sv:name="jcr:uuid" sv:type="String">
              <sv:value>ca110ecb-1f72-4c8f-8d22-e83046bd9d14</sv:value>
            </sv:property>
            <sv:property sv:name="class" sv:type="String">
              <sv:value>info.magnolia.ui.form.field.definition.TextFieldDefinition</sv:value>
            </sv:property>
            <sv:property sv:name="jcr:createdBy" sv:type="String">
              <sv:value>admin</sv:value>
            </sv:property>
            <sv:property sv:name="label" sv:type="String">
              <sv:value>Artists (i.e. Prince, The Fugees)</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean">
              <sv:value>false</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:created" sv:type="Date">
              <sv:value>2016-10-18T16:15:34.890+02:00</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:createdBy" sv:type="String">
              <sv:value>superuser</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
              <sv:value>2016-10-18T16:15:34.896+02:00</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
              <sv:value>superuser</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastModified" sv:type="Date">
              <sv:value>2016-10-18T16:18:21.871+02:00</sv:value>
            </sv:property>
            <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
              <sv:value>superuser</sv:value>
            </sv:property>
          </sv:node>
        </sv:node>
      </sv:node>
    </sv:node>
  </sv:node>
</sv:node>

Template (FTL)

[#if content.events?has_content]
    [#list cmsfn.children(content.events) as eventItem]
            ${eventItem.eventName!}: ${eventItem.eventArtists!}.<br/>
    [/#list]
[/#if]

Resources

wiki.magnolia-cms.com/display/DEV/Multi+Value+Field

documentation.magnolia-cms.com/display/DOCS/Multivalue+field

similar question on Magnolia Forum

similar issue on Magnolia's ticketing system

Adriano
  • 19,463
  • 19
  • 103
  • 140