Issue Bug Closed

#101706YamlFileLoader does not produce the expected php array

Philipp Wrann 08/17/23, 12:19 updated 03/02/25, 21:03

Description

I created an extension, that adds 2 Custom Finishers for the form framework. I decided to provide 1 YAML File for each finisher and import both files from one entry point

The following setup (only relevant parts included) produces the wrong result:

ext_localconf.php

module.tx_form {
    settings {
        yamlConfigurations {
            1685455665 = EXT:my_ext/Configuration/Form/Setup.yaml
        }
    }
}

Setup.yaml

imports:
  - { resource: "./Finishers/Custom1.yaml" }
  - { resource: "./Finishers/Custom2.yaml" }

Custom1.yaml

TYPO3:
  CMS:
    Form:
      prototypes:
        standard:
          formElementsDefinition:
            Form:
              formEditor:
                editors:
                  900:
                    selectOptions:
                      200:
                        value: 'Custom1Finisher'
                        label: 'Custom1'

Custom2.yaml

TYPO3:
  CMS:
    Form:
      prototypes:
        standard:
          formElementsDefinition:
            Form:
              formEditor:
                editors:
                  900:
                    selectOptions:
                      210:
                        value: 'Custom2Finisher'
                        label: 'Custom2'

The Result will be:

TYPO3:
  CMS:
    Form:
      prototypes:
        standard:
          formElementsDefinition:
            Form:
              formEditor:
                editors:
                  0:
                    selectOptions:
                      200:
                        value: 'Custom1Finisher'
                        label: 'Custom1'
                  1:
                    selectOptions:
                      210:
                        value: 'Custom2Finisher'
                        label: 'Custom2'
                  900:
                    selectOptions:
                      # selectOptions do not contain the new options 200/210

The following setup produces the correct result:

ext_localconf.php

module.tx_form {
    settings {
        yamlConfigurations {
            1685455665 = EXT:my_ext/Configuration/Form/Finishers/Custom1.yaml
            1685455666 = EXT:my_ext/Configuration/Form/Finishers/Custom2.yaml
        }
    }
}

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.