Bug #71564

FAL file pick in flexform causes error 500 alert box

Added by Armin Vieweg over 3 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-11-13
Due date:
% Done:

100%

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

Description

When I click on "Add image" and select a file in popup an alert box appears which says error 500. TYPO3 7.6 LTS.

This is from error log:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1446996319: Configuration retrieved from FlexForm is incomplete or not
of type "inline".| UnexpectedValueException thrown in file /kunden/303809_70794/rp-hosting/12529/62529/typo3_src/master/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
in line 811. Requested URL: http://***.de/typo3/index.php?ajaxID=%2Fajax%2Frecord%2Finline%2Fcreate&ajaxToken=7f5400a984784016695d4bf812cd3d14f031d1c6    

The configuration of this field is:

<config>
    <type>inline</type>
    <foreign_field>uid_foreign</foreign_field>
    <foreign_label>uid_local</foreign_label>
    <foreign_match_fields>
        <fieldname>fal</fieldname> <!-- Replace "fal" with name of variable of this field (e.g. images)! -->
    </foreign_match_fields>
    <foreign_selector>uid_local</foreign_selector>
    <foreign_selector_fieldTcaOverride>
        <config>
            <appearance>
                <elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg</elementBrowserAllowed>
                <elementBrowserType>file</elementBrowserType>
            </appearance>
        </config>
    </foreign_selector_fieldTcaOverride>
    <foreign_sortby>sorting_foreign</foreign_sortby>
    <foreign_table>sys_file_reference</foreign_table>
    <foreign_table_field>tablenames</foreign_table_field>
    <foreign_types type="array">
        <numIndex index="0">
            <showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette</showitem>
        </numIndex>
    </foreign_types>

    <filter type="array">
        <numIndex index="0">
            <parameters>
                <allowedFileExtensions>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg</allowedFileExtensions>
                <disallowedFileExtensions></disallowedFileExtensions>
            </parameters>
            <userFunc>TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter->filterInlineChildren</userFunc>
        </numIndex>
    </filter>

    <minitems>0</minitems>
    <maxitems>99</maxitems>

    <appearance>
        <useSortable>1</useSortable>
        <headerThumbnail>
            <field>uid_local</field>
            <width>45c</width>
            <height>45</height>
        </headerThumbnail>

        <showPossibleLocalizationRecords>0</showPossibleLocalizationRecords>
        <showRemovedLocalizationRecords>0</showRemovedLocalizationRecords>
        <showSynchronizationLink>0</showSynchronizationLink>
        <useSortable>1</useSortable>
        <enabledControls>
            <delete>1</delete>
            <dragdrop>1</dragdrop>
            <hide>1</hide>
            <info>1</info>
            <localize>1</localize>
            <new>0</new>
            <sort>1</sort>
        </enabledControls>
        <createNewRelationLinkTitle>LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
    </appearance>

    <behaviour>
        <localizationMode>select</localizationMode>
        <localizeChildrenAtParentLocalization>1</localizeChildrenAtParentLocalization>
    </behaviour>
</config>


Related issues

Related to TYPO3 Core - Bug #71436: Inline in flex with multiple DS fails Closed 2015-11-09
Duplicated by Grid Elements (former official tracker) - now moved to Gitlab! - Bug #71593: Using FAL in gridelements fails with FATAL Closed 2015-11-16
Blocks TYPO3 Core - Bug #71619: FAL relation with min=1, max=1 not deletable Closed 2015-11-17

Associated revisions

Revision 570e19ed (diff)
Added by Morton Jonuschat over 3 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 over 3 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/44733

#2 Updated by Thomas Maroschik over 3 years ago

Hey,

this issue is twofold. I could resolve it by aligning my flexform more to the documentation and the attached patch. My flexform DS started like the following structure

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
    <meta type="array">
        <langDisable>1</langDisable>
    </meta>
    <ROOT type="array">
        <el type="array">

but it has to be like this

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <ROOT>
        <type>array</type>
        <el>

#3 Updated by Christian Kuhn over 3 years ago

probably a dupe of #71436

#4 Updated by Armin Vieweg over 3 years ago

@Thomas, this is my flexform DS. Looks like your second example. And when I checkout your patch, nothing changes.

<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
        <langDatabaseOverlay>1</langDatabaseOverlay>
    </meta>
    <sheets>
        <sheet0>
            <ROOT>
                <TCEforms>
                    <sheetTitle>LLL:EXT:dce/Resources/Private/Language/locallang.xml:generaltab</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <settings.fal>
                        <TCEforms>
                            <label>FAL</label>
                            <!-- See <config /> from above -->
                        </TCEforms>
                    </settings.fal>
                </el>
            </ROOT>
        </sheet0>
    </sheets>
</T3DataStructure>

#5 Updated by Christian Kuhn over 3 years ago

  • Status changed from Under Review to Resolved

closed as dupe of #71436

#6 Updated by Christian Kuhn over 3 years ago

  • % Done changed from 0 to 100

#7 Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF