Bug #87520

EXT:FORM - BE Lang DE/EN - Label-Error

Added by Sebastian Schmal 10 months ago. Updated 22 days ago.

Status:
Resolved
Priority:
Must have
Category:
Form Framework
Target version:
-
Start date:
2019-01-22
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
form
Complexity:
Is Regression:
Sprint Focus:

Description

If i have a "Admin-User" with a BE Lang: EN
Add a "Content element" in a form.
Save the form with the new element works it fine.

If i change the BE Lang in DE
Go to the Form, click on "save" and now the Error Output:

Oops, an error occurred!
Exception while property mapping at property path "": The value "Content element" of property "label" (form element "contentelement-1") is not equal to the default value "Inhaltselement" #1528588035
More information regarding this error might be available online.

Associated revisions

Revision c274a4b4 (diff)
Added by Ralf Zimmermann 22 days ago

[BUGFIX] Proper form definition validation if backend language changes

If a form element property is not defined through a form editor
inspector, the "predefinedDefaults" value from the form editor setup
will be used for some data integrity checks (such properties are
immutable).

Now, such checks against the "predefinedDefaults" values are only used
in scenarios where form elements are newely created. All the following
integrety checks on this value will be based on hmac validation.

In addition, this patchset fixes a faulty validation in the following
(edgy) scenario:

  • backend language is EN
  • open the form edtior and add a ContentElement form element
  • switch to another browser tab and change the backend language to DE
  • clear the cache
  • go back to the form editor and click the save button

This is done by getting all translations (for all backend languages)
for the untranslated! "predefinedDefaults" value and compare the
(already translated) value (from the form definition) against the
possible translations from "predefinedDefaults".

There is an extended scenario which is out of scope for fixing:

  • the same scenario as above + delete the previous chosen backend
    language within the maintenance tool

Resolves: #87520
Releases: master, 9.5
Change-Id: I6f486956c24121c0065b67b4f2179301e2a344c4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60638
Tested-by: TYPO3com <>
Tested-by: Tobi Kretschmann <>
Tested-by: Sascha Rademacher <>
Tested-by: Julian Geils <>
Tested-by: Susanne Moog <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Julian Geils <>
Reviewed-by: Susanne Moog <>

Revision 81830ef4 (diff)
Added by Ralf Zimmermann 22 days ago

[BUGFIX] Proper form definition validation if backend language changes

If a form element property is not defined through a form editor
inspector, the "predefinedDefaults" value from the form editor setup
will be used for some data integrity checks (such properties are
immutable).

Now, such checks against the "predefinedDefaults" values are only used
in scenarios where form elements are newely created. All the following
integrety checks on this value will be based on hmac validation.

In addition, this patchset fixes a faulty validation in the following
(edgy) scenario:

  • backend language is EN
  • open the form edtior and add a ContentElement form element
  • switch to another browser tab and change the backend language to DE
  • clear the cache
  • go back to the form editor and click the save button

This is done by getting all translations (for all backend languages)
for the untranslated! "predefinedDefaults" value and compare the
(already translated) value (from the form definition) against the
possible translations from "predefinedDefaults".

There is an extended scenario which is out of scope for fixing:

  • the same scenario as above + delete the previous chosen backend
    language within the maintenance tool

Resolves: #87520
Releases: master, 9.5
Change-Id: I6f486956c24121c0065b67b4f2179301e2a344c4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60639
Tested-by: TYPO3com <>
Tested-by: Tobi Kretschmann <>
Tested-by: Julian Geils <>
Tested-by: Sascha Rademacher <>
Tested-by: Susanne Moog <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Julian Geils <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Felix P. <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Tobi Kretschmann 8 months ago

  • PHP Version changed from 7.0 to 7.1

I can confirm this behavior in TYPO3 8.7.24.

I have many forms. some where created with BE language in English others with German.

With my admin user and BE set to English, all I have to do to get this exception is to add a content element, no matter if there is already an existing one.

#2 Updated by Nikolaj Short 8 months ago

Can confirm this issue on TYPO3 9.5.5.
The backend language seems to be the cause.

#3 Updated by Bjoern Jacob 8 months ago

  • Sprint Focus set to Remote Sprint

#4 Updated by Susanne Moog 7 months ago

  • Assignee set to Ralf Zimmermann
  • Sprint Focus deleted (Remote Sprint)

#5 Updated by Ralf Zimmermann 7 months ago

  • Status changed from New to In Progress

#6 Updated by Gerrit Code Review 7 months ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60638

#7 Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60639

#8 Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60639

#9 Updated by Gerrit Code Review 7 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60638

#10 Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60639

#11 Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60638

#12 Updated by Gerrit Code Review 7 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60638

#13 Updated by Gerrit Code Review 7 months ago

Patch set 4 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60639

#14 Updated by Ralf Zimmermann 7 months ago

Since there are no backend languages available for TYPO3 v10 you can test this patch with the v9 version of the patch https://review.typo3.org/#/c/Packages/TYPO3.CMS/+/60639/

Test scenarios:

1:

  • you must have 2 backend languages e.g. "EN" and "DE"
  • switch to the "User Settings" module
  • change the backend language to "EN"
  • create a new form
  • open the form with the form editor
  • create a form element "ContentElement"
  • save the form
  • switch to the "User Settings" module
  • change the backend language to "DE"
  • clear the system cache
  • open the previous created form with the form editor
  • save the form

2:

  • you must have 2 backend languages e.g. "EN" and "DE"
  • switch to the "User Settings" module (browser tab 1)
  • change the backend language to "EN" (browser tab 1)
  • create a new form (browser tab 2)
  • open the form with the form editor (browser tab 2)
  • create a form element "ContentElement" (browser tab 2)
  • change the backend language to "DE" (browser tab 1)
  • clear the system cache (browser tab 1)
  • save the form (browser tab 2)

#15 Updated by Clemens Riccabona about 2 months ago

Can confirm for TYPO3 v8.7.27.

Is there any chance to see a bugfix for v8 LTS?

#16 Updated by Anonymous 22 days ago

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

Also available in: Atom PDF