element multiple cannot be used in the child form

Created on 23 August 2022, almost 2 years ago
Updated 15 February 2023, over 1 year ago

Hello, the child form is loaded in the parent form, and element multiple cannot be used in the child form.

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡³China qiutuo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ͺπŸ‡ΈSpain pcambra Spain, πŸ‡ͺπŸ‡Ί

    This is probably an issue of merging the configuration, I've found issues (values were duplicated on save) when doing blocks and using element multiple.

    UsingNestedArray::mergeDeepArray like so, fixes the issue:

      /**
       * {@inheritdoc}
       */
      public function setConfiguration(array $configuration) {
        $this->configuration = NestedArray::mergeDeepArray(
          [$this->baseConfigurationDefaults(),
          $this->defaultConfiguration(),
          $configuration],
          TRUE
        );
    

    Related to πŸ“Œ Create a trait and base class to implement \Drupal\Component\Plugin\ConfigurableInterface Needs work

Production build 0.69.0 2024