Bug #70918

Story #69617: FormEngine bugs

Adding inline relations in FlexForms is broken

Added by Felix Rauch about 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-10-21
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

This bug was introduced with #70490, https://review.typo3.org/#/c/43755/ .

Given a field of type inline in a plugin's FlexForm, creating IRRE child records fails with status code 500 Internal Server Error.

#1437654409: No $tableName given

InvalidArgumentException thrown in file
/opt/typo3_src-master/typo3/sysext/backend/Classes/Form/FormDataCompiler.php in line 81.

I attached the full stacktrace.

Going back before commit efa8c85, this does not happen.

sadness.html View (8 KB) Felix Rauch, 2015-10-21 16:44

fix.patch View (1.38 KB) Nikolas Hagelstein, 2016-09-20 17:22


Related issues

Related to TYPO3 Core - Task #70490: FormEngine inline refactoring Closed 2015-10-08
Related to TYPO3 Core - Bug #68045: Inline add of FAL images in flexform does not work Closed 2015-07-10
Related to TYPO3 Core - Bug #71436: Inline in flex with multiple DS fails Closed 2015-11-09
Related to Grid Elements (former official tracker) - now moved to Gitlab! - Bug #70442: Image elements form flexform not available in typoscript / Fluid Closed 2015-10-06
Duplicated by TYPO3 Core - Bug #71413: FormInlineAjaxController::create should set inlineParent values in child Closed 2015-11-08

Associated revisions

Revision b2d87462 (diff)
Added by Morton Jonuschat about 4 years ago

[BUGFIX] FormEngine: Fix IRRE handling in flexforms

This patchset solves multiple problems with handling IRRE within a
FlexForm:

  • creating new records no longer triggers an internal server error
    due to missing parent data
  • IRRE children are passed to the renderer so that they get displayed
    in the backend
  • child table is determined correctly within flexforms when toggling
    expand/collapse state.

Resolves: #70918
Resolves: #70859
Releases: master
Change-Id: I93abeab696fff356453f0a1c305a8cfeede7158c
Reviewed-on: https://review.typo3.org/44579
Reviewed-by: Frank Nägler <>
Tested-by: Frank Nägler <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 570e19ed (diff)
Added by Morton Jonuschat almost 4 years ago

[BUGFIX] FormEngine: Select correct FlexForm DS for inline records

If an inline field is defined within a FlexForm that has multiple data
structures defined the FormAjaxInlineController always selects the
default data structure due to missing context information.

This patch transmits the required context within the AJAX request to
enable selecting the appropriate data structure for the flexform.

It also changes the method to determine the path through the flexform
data structure to work in the case of an inline element configured
within a flexform within another inline element.

Resolves: #71436
Related: #70918
Related: #71564
Related: #71655
Releases: master
Change-Id: I7ecd174b78997ad3b1d1513a15a78cdc7bac23ff
Reviewed-on: https://review.typo3.org/44914
Tested-by: Armin Ruediger Vieweg <>
Tested-by: Sebastian Michaelsen <>
Tested-by: Felix Rauch <>
Reviewed-by: Claus Due <>
Tested-by: Christopher Orth <>
Tested-by: Torsten <>
Tested-by: Philipp Wrann <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>

History

#1 Updated by Gerrit Code Review about 4 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/44614

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

#3 Updated by Morton Jonuschat about 4 years ago

  • Parent task set to #69617

#4 Updated by Gerrit Code Review about 4 years ago

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

#5 Updated by Gerrit Code Review about 4 years ago

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

#6 Updated by Felix Rauch about 4 years ago

Not sure if this belongs here, I've been testing patch set 8 of https://review.typo3.org/44579 and am still getting a 500 Internal Server Error when creating new relations.

Configuration retrieved from FlexForm is incomplete or not of type "inline".

This is the field's config, I don't know how it is incomplete:

<settings.boxBackground>
    <TCEforms>
        <label>Lorem</label>
        <config>
            <type>inline</type>
            <maxitems>1</maxitems>
            <foreign_table>sys_file_reference</foreign_table>
            <foreign_field>uid_foreign</foreign_field>
            <foreign_table_field>tablenames</foreign_table_field>
            <foreign_label>uid_local</foreign_label>
            <foreign_sortby>sorting_foreign</foreign_sortby>
            <foreign_selector>uid_local</foreign_selector>
            <foreign_selector_fieldTcaOverride type="array">
                <config>
                    <appearance>
                        <elementBrowserType>file</elementBrowserType>
                        <elementBrowserAllowed>jpg,png</elementBrowserAllowed>
                    </appearance>
                </config>
            </foreign_selector_fieldTcaOverride>
            <foreign_match_fields type="array">
                <fieldname>box_background</fieldname>
            </foreign_match_fields>
            <appearance type="array">
                <newRecordLinkAddTitle>1</newRecordLinkAddTitle>
                <headerThumbnail>
                    <field>uid_local</field>
                    <height>64</height>
                    <width>64</width>
                </headerThumbnail>
            </appearance>
        </config>
    </TCEforms>
</settings.boxBackground>

#7 Updated by Felix Rauch about 4 years ago

Some more information: Debugging shows that $parentConfig in FormInlineAjaxController->getParentConfigFromFlexForm does not contain my actual flexform, but only the tt_content default flexform config (with the only field being <xmlTitle>).

#8 Updated by Christian Kuhn about 4 years ago

Felix, i can confirm your issue by thinking, but this is not trivial to solve. we'll probably merge the patch as is to mitigate the flex-inline problem for now and will extract your 'flex-inline-with-multiple-flex-ds-defined' to an own issue that will be handled after release.

#9 Updated by Gerrit Code Review about 4 years ago

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

#10 Updated by Morton Jonuschat about 4 years ago

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

#11 Updated by Wolfram Eberius almost 4 years ago

Hi,

I'm not sure whether to comment here or https://forge.typo3.org/issues/71436#note-26 on that...seems not to be resolved on 7.6.2 or am I missing something?

#12 Updated by David Voigt over 3 years ago

I'm experiencing this issue in TYPO3 7.6.4, too. This core patch fixed the issue for me (don't forget to patch fluidcontent, too. Link is included in this page):
http://p.cweiske.de/270

#13 Updated by Nikolas Hagelstein about 3 years ago

David Voigt wrote:

I'm experiencing this issue in TYPO3 7.6.4, too. This core patch fixed the issue for me (don't forget to patch fluidcontent, too. Link is included in this page):
http://p.cweiske.de/270

Not really ;) Of course $databaseRow need to be fetched correctly in detailAction as well. Otherwise ur not able open the image.
Find patch attached.

Cheers,
Nikolas

#14 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF