Project

General

Profile

Actions

Bug #99719

open

Saving an empty form leads to a defective yaml configuration

Added by Thomas Balko 8 months ago. Updated 4 months ago.

Status:
New
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 #1

Updated by Benni Mack 4 months ago

  • Sprint Focus set to Stabilization Sprint
Actions

Also available in: Atom PDF