form validation in backend not working onload
When a form is loaded (e.g. when adding a new page) required fields are not evaluated on load of the form. As soon as I change a field all required fields are evaluated and marked when empty.
This is a problem as the form can be saved successfully as long as no inputs are done even though fields are required.
I experience this bug since TYPO3 7.6.17. In TYPO3 7.6.16 everything works fine.
I think this commit is the cause for this bug: https://github.com/TYPO3/TYPO3.CMS/commit/e6b3d3c3ddfbff752426e8002914b14ef2e5893c
related issue: https://forge.typo3.org/issues/80481
[BUGFIX] Validate FormEngine fields on load
Make sure the validation of FormEngine fields is triggered on load.
This bug does not occur in newer versions.
Reviewed-by: Markus Klein <firstname.lastname@example.org>
Tested-by: Markus Klein <email@example.com>
Reviewed-by: Andreas Fernandez <firstname.lastname@example.org>
Tested-by: TYPO3com <email@example.com>
#9 Updated by Frank Naegler about 1 year ago
- Status changed from New to Needs Feedback
we have problems to reproduce this behavior, please provide some more information:
1) Which browser and version?
2) Which operation system and version?
3) How fast is your internet connection, please let run a speedtest and show us the connection information
#10 Updated by Hannes Bochmann about 1 year ago
1) Firefox 54.0, Chrome 59.0.3071.109
2) Debian 8.7 inside docker container / native Ubuntu 16.04
3) Does not matter. The sites runs locally inside a docker container. If I run it on my machine directly through an Apache webserver I get the same results. As soon as I downgrade to TYPO3 7.6.16 everything works again.
#11 Updated by Markus Klein about 1 year ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Markus Klein
- Target version set to next-patchlevel
- Complexity set to hard
I do have a local project now, where I can reproduce the issue.
Latest 7.6 source, latest Chrome. No messages in the console.
#12 Updated by Michael Stucki about 1 year ago
- File 81520-BUGFIX-Validate-FormEngine-fields-on-load.patch added
The attached patch will solve this problem on TYPO3 7.6.
It looks like the validate() function of the FormEngineValidation object is not called on start.
I did not try this in an empty installation yet, but for me it looks obvious that this is currently broken.
How to reproduce:
1. Create a new page
2. Save immediately without touching any input fields
3. The page is saved although it has required fields (e.g. page title) empty
Does this problem also happen in version 8?