Task #80100

Story #69617: FormEngine bugs

Bypass fetch of database record if already loaded

Added by Xavier Perseguers over 2 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2017-03-02
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

In order to let FormEngine being used with arbitrary array of data, \TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseEditRow
should return right away if the database row is already populated.

This could happen if an extension is registering a provider called before this database provider. See EXT:image_autoresize with #79850 for such a use case.

Buttonpress_has_no_effect.png View (33.8 KB) Xavier Perseguers, 2017-03-22 11:36

error-inline-localization-DatabaseEditRow.png View (126 KB) Michael Schütz, 2017-04-12 10:28


Related issues

Related to Resize images automatically - Bug #79850: Fatal in extension configuration Closed 2017-02-16
Related to TYPO3 Core - Bug #80473: Do not bypass fetch of database record if tableName is tt_content Closed 2017-03-27
Related to TYPO3 Core - Bug #80426: Creating a FlexForm section causes exception in ajax request (none admin user) Closed 2017-03-23
Related to TYPO3 Core - Bug #80825: FlexForm Sections don't get saved before the parent record was stored to the DB Closed 2017-04-12
Related to TYPO3 Core - Bug #80855: IRRE: "Localize all records" and "Synchronize with default language" not working anymore Closed 2017-04-16
Related to TYPO3 Core - Bug #81175: IRRE synchronizeLocalizeRecords dont work since TYPO3 7.6.17 Rejected 2017-05-10

Associated revisions

Revision 3f35a3c1 (diff)
Added by Xavier Perseguers over 2 years ago

[TASK] Bypass fetch of database record if already loaded

Change-Id: I737f76e497ef4a9c2ce1439cfe09b0b1e75afd73
Resolves: #80100
Releases: master
Reviewed-on: https://review.typo3.org/51929
Tested-by: TYPO3com <>
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>
Reviewed-by: Helmut Hummel <>
Reviewed-by: Frank Nägler <>
Tested-by: Frank Nägler <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 0f2028a3 (diff)
Added by Xavier Perseguers over 2 years ago

[TASK] Bypass fetch of database record if already loaded

Change-Id: I737f76e497ef4a9c2ce1439cfe09b0b1e75afd73
Resolves: #80100
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/52003
Reviewed-by: Xavier Perseguers <>
Tested-by: Xavier Perseguers <>
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision ff0b0832 (diff)
Added by Xavier Perseguers over 2 years ago

[BUGFIX] Remove partial row initialization in FlexForm sections

Since #80100, database row should not be partially initialized before
calling DatabaseEditRow form data provider. This changes removes the
partial row initialization with only the corresponding "uid" which is
not needed anyway.

Resolves: #80473
Resolves: #80426
Related: #80100
Releases: master
Change-Id: Iadf180a0c52e36989afcb2a59ff7746a60e81bfb
Reviewed-on: https://review.typo3.org/52174
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Thomas Hohn <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Reviewed-by: Jan Helke <>

Revision b6482afe (diff)
Added by Susanne Moog about 2 years ago

[BUGFIX] Remove manually set database row

databaseRow should not be set incompletely in a
FormDataProvider or controller as subsequent
processing may rely on the complete database
row being set (for example language fields).

Resolves: #80855
Related: #80100
Release: master, 8.7, 7.6
Change-Id: I139b426c6598a93a2012cae088e3cbece4e1a83b
Reviewed-on: https://review.typo3.org/52543
Tested-by: TYPO3com <>
Reviewed-by: Oliver Hader <>
Reviewed-by: Faton Haliti <>
Tested-by: Oliver Hader <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 51d227a2 (diff)
Added by Susanne Moog about 2 years ago

[BUGFIX] Remove manually set database row

databaseRow should not be set incompletely in a
FormDataProvider or controller as subsequent
processing may rely on the complete database
row being set (for example language fields).

Resolves: #80855
Related: #80100
Release: master, 8.7, 7.6
Change-Id: I139b426c6598a93a2012cae088e3cbece4e1a83b
Reviewed-on: https://review.typo3.org/53209
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision e8f97da1 (diff)
Added by Susanne Moog about 2 years ago

[BUGFIX] Remove manually set database row

databaseRow should not be set incompletely in a
FormDataProvider or controller as subsequent
processing may rely on the complete database
row being set (for example language fields).

Resolves: #80855
Related: #80100
Release: master, 8.7, 7.6
Change-Id: I139b426c6598a93a2012cae088e3cbece4e1a83b
Reviewed-on: https://review.typo3.org/53210
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision e3fd3c7a (diff)
Added by Christian Kuhn about 2 years ago

[BUGFIX] FormEngine creating section container in new record

If a records has not been persisted and a flex section container
is added, the form compiler needs the "NEW123" uid of parent to
prefix form fields correctly.

Change-Id: Iab3945efa93d2becf636c5cf4f8596bc696cd2e0
Resolves: #80825
Related: #80100
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53215
Tested-by: TYPO3com <>
Reviewed-by: Daniel Goerz <>
Tested-by: Daniel Goerz <>
Tested-by: Mona Muzaffar <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>

Revision 957f4a52 (diff)
Added by Christian Kuhn about 2 years ago

[BUGFIX] FormEngine creating section container in new record

If a records has not been persisted and a flex section container
is added, the form compiler needs the "NEW123" uid of parent to
prefix form fields correctly.

Change-Id: Iab3945efa93d2becf636c5cf4f8596bc696cd2e0
Resolves: #80825
Related: #80100
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53215
Reviewed-on: https://review.typo3.org/53257
Tested-by: TYPO3com <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>

History

#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New 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/51929

#2 Updated by Gerrit Code Review over 2 years 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/51929

#3 Updated by Gerrit Code Review over 2 years ago

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/52003

#4 Updated by Gerrit Code Review over 2 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/52003

#5 Updated by Xavier Perseguers over 2 years ago

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

#6 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Resolved to Under Review

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/52003

#7 Updated by Gerrit Code Review over 2 years ago

Patch set 4 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/52003

#8 Updated by Xavier Perseguers over 2 years ago

  • Status changed from Under Review to Resolved

#9 Updated by Morten Pless over 2 years ago

  • File Buttonpress has no effect.png added
  • File Buttonpress has no effect.png added

This change breaks the ability to add new data with IRRE.
At least in my setup.
Can anyone confirm?

#10 Updated by Xavier Perseguers over 2 years ago

Maybe you should provide a bit more information of what exactly is "your setup".

#11 Updated by Xavier Perseguers over 2 years ago

  • File deleted (Buttonpress has no effect.png)

#13 Updated by Faton Haliti over 2 years ago

It breaks when trying to add array data which was configured in flexform.

My setup is:
Typo3 v8.7.0-dev
MySql 5.7.17
Apache 2.4.25

#14 Updated by Michael Schütz over 2 years ago

InlineLocalization fails with error 200 in TYPO3 8.7.0
-------------------------------------------------------
I have a setup, where I use tt_content records inside of tt_content record as childs
-------------------------------------------------------
1.) /typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseEditRow.php <<< delivers in TYPO3 v8.7.0 not the data from database. In TYPO3 v8.6.1 it works
1.1.) Reason there is changed the IF-statement

L:34 if ($result['command'] !== 'edit') {
L:35 return $result;
L:36 }

L:34 if ($result['command'] !== 'edit' || !empty($result['databaseRow'])) {
L:35 return $result;
L:36 }

But "$result['databaseRow']" isn't empty it just contains the "uid" as reference to the record. In the next step "$result['databaseRow']" does not get completed with the information of the whole record-information. So in the next steps the localization of the childs fails because there is no target language ID in "sys_language_uid" and no reference to record in source-language "l18_parent". After looping through all DataProviders "sys_language_uid" and "l18n_parent" are "0".

Content of array "$result". Key databaseRow contains already the reference uid to the record. Fetching data is skipped now by "!empty($result['databaseRow'])"

"command": "edit",
"tableName": "tt_content",
"vanillaUid": 6,
"returnUrl": "\/typo3\/index.php?ajaxID=%2Fajax%2Frecord%2Finline%2Fsynchronizelocalize&ajaxToken=24813fec11afe3df797970cc3ce0373006d284ff",
"recordTitle": "",
"parentPageRow": null,
"neighborRow": null,
"databaseRow": {
"uid": 6
},
"effectivePid": 0,
"rootline": [],
...

#15 Updated by Daniel Goerz over 2 years ago

  • Related to Bug #80825: FlexForm Sections don't get saved before the parent record was stored to the DB added

#16 Updated by Christian Kuhn over 2 years ago

  • Parent task set to #69617

#17 Updated by Christian Kuhn about 2 years ago

  • Related to Bug #80855: IRRE: "Localize all records" and "Synchronize with default language" not working anymore added

#18 Updated by König David about 2 years ago

  • Related to Bug #81175: IRRE synchronizeLocalizeRecords dont work since TYPO3 7.6.17 added

#19 Updated by Christian Kuhn about 2 years ago

For reference, here is a list of patches:

#20 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF