Project

General

Profile

Actions

Bug #99719

closed

Saving an empty form leads to a defective yaml configuration

Added by Thomas Balko almost 2 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2023-01-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Stabilization Sprint

Description

Steps to reproduce the issue

  • In the forms mdoule create a new blank form, give it a name and click "finish!".
  • In the now following mask: Edit nothing just click "save" and then close
  • You now have created a defective yaml conf. When you download and look at the resulting yaml file you will see that it created an entry inside fieldState of the type "Page", but there is no form element of the type "Page", what will cause an error later.
    
    renderingOptions:
      submitButtonLabel: Submit
      fieldState:
        page-1:
          type: Page
          identifier: page-1
          label: Step
          renderingOptions:
            deleted: 1
            listView: 1
    type: Form
    identifier: testblankform
    label: 'Test blank form'
    prototypeName: standard
    renderables:
      -
        renderingOptions:
          previousButtonLabel: 'Previous step'
          nextButtonLabel: 'Next step'
        type: Page
        identifier: page-1
        label: Step
    
    

The editor doesn't see that there is something off with the form config. They can continue to edit the form, set fields and finishers and implement the form into the web page.
When the editor later tries to check the form results in the "Form results" BE module they will recieve the following error:

#1327318156 TYPO3\CMS\Form\Domain\Exception\TypeDefinitionNotValidException
The "implementationClassName" for element "page-1" ("TYPO3\CMS\Form\Domain\Model\FormElements\Page") does not implement the FormElementInterface.

The form can be fixed by removing the faulty "page-1" entry in the YAML config. Also the form results can then be accesed without problems. But this is not a good solution, because it require server file acces priviliges and is inaccessible for normal editors.

Excpected behaviour

Saving an empty form should not result in a defective yaml config. (Don't save the step information inside the fieldState-node when there are no fields selected)

More Info

Operating system: Unix
PHP Version: 7.4.28
TYPO3 Version: 10.4.34
EXT:form Version: 10.4.34
EXT:form_to_database Version: 2.0.4


Files

Actions

Also available in: Atom PDF