Project

General

Profile

Actions

Bug #81520

closed

form validation in backend not working onload

Added by DMK E-BUSINESS GmbH over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend User Interface
Target version:
Start date:
2017-06-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.1
Tags:
eval required TCA FormEngine TCEFORMS
Complexity:
hard
Is Regression:
Yes
Sprint Focus:

Description

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80481: FormEngine.Validation may access DOM too earlyClosedMarkus Klein2017-03-27

Actions
Actions #1

Updated by Georg Ringer over 7 years ago

  • Status changed from New to Needs Feedback

can you test latest version?

Actions #2

Updated by DMK E-BUSINESS GmbH over 7 years ago

The problem still exists. I tried it with commit 20a9592cacb81433be5c5dca2f077bdb00b5ace0. After loading the form in the backend there seems to be some Ajax action but the fields still get not marked as required as long as no field was changed.

Actions #3

Updated by Oliver Hader over 7 years ago

  • Related to Bug #80481: FormEngine.Validation may access DOM too early added
Actions #4

Updated by Markus Klein over 7 years ago

  • Target version set to Candidate for patchlevel
  • Is Regression set to Yes
Actions #5

Updated by Markus Klein over 7 years ago

  • Status changed from Needs Feedback to New
Actions #6

Updated by Markus Klein over 7 years ago

  • Status changed from New to Needs Feedback

I tried it with latest 7.6.19-dev and it seems to work there.

Actions #7

Updated by DMK E-BUSINESS GmbH over 7 years ago

I just tried it with the new 7.6.19 and the problem still exists for me.

Actions #8

Updated by Markus Klein over 7 years ago

  • Status changed from Needs Feedback to New
  • Target version deleted (Candidate for patchlevel)
  • Is Regression deleted (Yes)
Actions #9

Updated by Frank Nägler over 7 years ago

  • Status changed from New to Needs Feedback

Hi,
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

Actions #10

Updated by Hannes Bochmann over 7 years 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.

Actions #11

Updated by Markus Klein over 7 years 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.

Actions #12

Updated by Michael Stucki over 7 years 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?

Actions #13

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53328

Actions #14

Updated by Michael Stucki over 7 years ago

  • File deleted (81520-BUGFIX-Validate-FormEngine-fields-on-load.patch)
Actions #15

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53328

Actions #16

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53328

Actions #17

Updated by Michael Stucki over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #18

Updated by Michael Stucki over 7 years ago

  • Is Regression set to Yes
Actions #19

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF