Issue Bug Closed

#97352Configuring module.tx_form in sitepackage throws exception due to wrong path in EXT:form ext_localconf.php

Thorsten Weber 04/09/22, 18:35 updated 06/20/24, 05:49

Description

What I did:
Followed some Documentations / Blogs for setting up a contact form
My goal was to have all form definitions in my sitepackage to save them in git.

I therefore build a form.typoscript

plugin.tx_form {
  settings {
    yamlConfigurations {
      100 = EXT:totos_sitepackage_instance/Configuration/TotoBarefoot/Yaml/TotoBarefootFormSetup.yaml
    }
  }
}

module.tx_form {
  settings {
    yamlConfigurations {
      100 = EXT:totos_sitepackage_instance/Configuration/TotoBarefoot/Yaml/TotoBarefootFormSetup.yaml
    }
  }
}

This loads correctly in as seen in Template Analyzer
Screenshot_20220409_201838.png

TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedExtensionPaths:
          10: 'EXT:totos_sitepackage_instance/Configuration/TotoBarefoot/Yaml/Forms/form_definitions/'
          20: 'EXT:totos_sitepackage_instance/Resources/Private/TotoBarefoot/Forms/form_definitions/'
        allowSaveToExtensionPaths: true
        allowDeleteFromExtensionPaths: true
      prototypes:
        contactFormDefault:
          __inheritances:
            10: 'TYPO3.CMS.Form.prototypes.standard'
          formElementsDefinition:
            Form:
              renderingOptions:
                templateRootPaths:
                  20: 'EXT:totos_sitepackage_instance/Resources/Private/TotoBarefoot/Extensions/Form/Templates/Frontend/'
                partialRootPaths:
                  20: 'EXT:totos_sitepackage_instance/Resources/Private/TotoBarefoot/Extensions/Form/Partials/Frontend/'
                layoutRootPaths:
                  20: 'EXT:totos_sitepackage_instance/Resources/Private/TotoBarefoot/Extensions/Form/Layouts/Frontend/'

Now when I try to load the forms module or the configuration Module -> yaml Form settings
I will always see :
!grafik.png!
My research then found in EXT:form/ext_localconf.php in Lines 38-52

    // Add module configuration
    ExtensionManagementUtility::addTypoScriptSetup(
        'module.tx_form {
    settings {
        yamlConfigurations {
            10 = EXT:form/Configuration/Form/FormSetup.yaml
        }
    }
    view {
        templateRootPaths.10 = EXT:form/Resources/Private/Backend/Templates/
        partialRootPaths.10 = EXT:form/Resources/Private/Backend/Partials/
        layoutRootPaths.10 = EXT:form/Resources/Private/Backend/Layouts/
    }
}'
    );

The path set in Line 43 10 = EXT:form/Configuration/Form/FormSetup.yaml does not exist in Extension.

The exception does not appear as long as I do not try to overload the module settings
The exception does not appear if I fix the path in Line 43 to 10 = EXT:form/Configuration/Yaml/FormSetup.yaml which is existing.

As I am not familiar with PRs for Core Bugs I could use a hand here.

Reviews 0

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