Bug #80825

Story #69617: FormEngine bugs

FlexForm Sections don't get saved before the parent record was stored to the DB

Added by Daniel Goerz over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Category:
FormEngine aka TCEforms
Start date:
2017-04-12
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Reproduce with current 8LTS and styleguide extension:

  1. Create a styleguide record "Form engine - flex"
  2. Go to tab "section container"
  3. Create one or more container.
  4. Save & Close

The error message "1: Attempt to insert record on page '[root-level]' (0) where this table, tx_styleguide_flex, is not allowed" is shown and the flexform was not stored. The field flex_2 of the newly created record is empty.

Containers can be created without problems once the parent recod is saved. The issue only occurs on creation of a new recod when it is saved for the first time.

error.png View (11 KB) Daniel Goerz, 2017-04-12 17:10


Related issues

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 - Task #80100: Bypass fetch of database record if already loaded Closed 2017-03-02
Related to TYPO3 Core - Bug #80426: Creating a FlexForm section causes exception in ajax request (none admin user) Closed 2017-03-23

Associated revisions

Revision e3fd3c7a (diff)
Added by Christian Kuhn over 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 over 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 Daniel Goerz over 2 years ago

  • Description updated (diff)

#2 Updated by Daniel Goerz over 2 years ago

  • Subject changed from FlexForm Sections don't get saved before the parent CE was stored to the DB to FlexForm Sections don't get saved before the parent record was stored to the DB

#3 Updated by Daniel Goerz over 2 years ago

  • Assignee set to Christian Kuhn

As discussed on slack, Christian needs free brain space for this one :)

Thank you for taking care!

#4 Updated by Daniel Goerz over 2 years ago

  • Related to Bug #80473: Do not bypass fetch of database record if tableName is tt_content added

#5 Updated by Daniel Goerz over 2 years ago

  • Related to Task #80100: Bypass fetch of database record if already loaded added

#6 Updated by Daniel Goerz over 2 years ago

  • Related to Bug #80426: Creating a FlexForm section causes exception in ajax request (none admin user) added

#7 Updated by Christian Kuhn over 2 years ago

first guess: that's probably related to the missing uid handling from https://review.typo3.org/#/c/51929/ / https://review.typo3.org/#/c/52174/ ... this needs further thoughts. i can dig into that before 8.7.1 release.

#8 Updated by Daniel Goerz over 2 years ago

This issue was also reported in the flux bugtracker on github as flux (like many other extensions) uses flexform sections.

For reference: https://github.com/FluidTYPO3/flux/issues/1400

#9 Updated by Radu Mogos over 2 years ago

Still present in 8.7.1

#10 Updated by José Ricardo over 2 years ago

I have a content element with flexform section and it always gives a 503 error when I try to add a new section element before saving the content itself. I think it's related to this.

The exception thrown is:
#1476107295: PHP Warning: Invalid argument supplied for foreach() {mybasedir}/typo3_src/typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php line 48 (More information)

I'm using and admin account on TYPO3 8.7.1
The same flexform works fine on 7.6.18

#11 Updated by Radu Mogos over 2 years ago

  • Priority changed from Should have to Must have

Any info if this will be adressed at least in 8.7.2 since it's a blocking issue when dealing with flexform sections

#12 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/53215

#13 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/53215

#14 Updated by Gregor Nathanael Meyer over 2 years ago

I tried out the patch set 2 and it solves the problem for me. Thanks.

#15 Updated by Gerrit Code Review over 2 years ago

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

#16 Updated by Christian Kuhn over 2 years ago

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

#17 Updated by José Ricardo over 2 years ago

Was this solved on 8.7.2?
THe problem I reported on my comment still exists. Not sure if it's another problem or this issue didn't came to 8.7.2;

#18 Updated by Daniel Goerz over 2 years ago

Hey Riccardo. What you describe looks like a different issue. The one tackled with the patch was only about flex form sections and - yes - this is now solved in TYPO2 8.7.2 thanks to Christian!

#19 Updated by José Ricardo over 2 years ago

Thanks for your answer Daniel. I created an issue to the problem I've reported: #81684

#20 Updated by José Ricardo over 2 years ago

  • Related to Bug #81684: Flexform sections can't be created until content element is saved added

#21 Updated by Fabian König about 1 year ago

  • Related to deleted (Bug #81684: Flexform sections can't be created until content element is saved)

#22 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF