Project

General

Profile

Actions

Bug #100733

closed

Undefined array key "data" in DataHandler.php line 3759

Added by Stephan Bauer about 1 year ago. Updated 7 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2023-04-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When copying pages I'm getting this error:

503
Oops, an error occurred!
PHP Warning: Undefined array key "data" in /html/typo3-staging/typo3_src-11.5.26/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3759

Actions #1

Updated by Oliver Hader about 1 year ago

  • Status changed from New to Needs Feedback

https://github.com/TYPO3/typo3/blob/372cef12b963c54f9737c66026a933923959fa8b/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L3759

Can you provide the configuration, TCA, FlexForm that leads to this scenario (or extension that was used)? Just to have a possibility to reproduce this scenario...

Actions #2

Updated by Stephan Bauer 12 months ago

The problem is the xml in database field pi_flexform.
I'm not exactly shure why this xml is in the field but I think it was a mistake during the convertion from grid_elements to container.

I can give you access to the system.

This is the xml:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <sheets>
        <sDEF>
            <ROOT type="array">
                <TCEforms>
                    <sheetTitle>LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:options</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el type="array">
                    <containerClass type="array">
                        <TCEforms type="array">
                            <label>LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.class</label>
                            <config type="array">
                                <type>input</type>
                                <eval>trim</eval>
                                <size>30</size>
                                <valuePicker>
                                    <mode>append</mode>
                                    <items type="array">
                                        <numIndex index="0" type="array">
                                            <numIndex index="0">LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.class.content</numIndex>
                                            <numIndex index="1">container </numIndex>
                                        </numIndex>
                                        <numIndex index="1" type="array">
                                            <numIndex index="0">LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.class.cardGroup</numIndex>
                                            <numIndex index="1">card-group </numIndex>
                                        </numIndex>
                                    </items>
                                </valuePicker>
                            </config>
                        </TCEforms>
                    </containerClass>
                    <containerAttribute type="array">
                        <TCEforms type="array">
                            <label>LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.attribute</label>
                            <config type="array">
                                <type>input</type>
                                <eval>trim</eval>
                                <size>30</size>
                            </config>
                        </TCEforms>
                    </containerAttribute>
                    <isContainerFluid type="array">
                        <TCEforms type="array">
                            <label>LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.isContainerFluid</label>
                            <config type="array">
                                <type>check</type>
                                <default>0</default>
                            </config>
                        </TCEforms>
                    </isContainerFluid>
                    <wrapSection type="array">
                        <TCEforms type="array">
                            <label>LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.wrapSection</label>
                            <config type="array">
                                <type>check</type>
                            </config>
                        </TCEforms>
                    </wrapSection>
                    <sectionClass type="array">
                        <TCEforms type="array">
                            <label>LLL:EXT:container_elements/Resources/Private/Language/locallang.xlf:container.sectionClass</label>
                            <config type="array">
                                <type>input</type>
                                <eval>trim</eval>
                                <size>30</size>
                            </config>
                        </TCEforms>
                    </sectionClass>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>

Actions #3

Updated by Stefan Bürk 11 months ago

If you have that xml in the pi_flexform field that is wrong. I guess we can properly guard the array key access error,
but that would still lead to an 503 for other things or produce any other weired issues.

You should properly clean these invalid xml from the database/pi_flexform field.

Actions #4

Updated by Christian Kuhn 7 months ago

  • Status changed from Needs Feedback to New

Stefan, I think we should still guard this. Will push a patch.

Actions #5

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

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

Actions #6

Updated by Gerrit Code Review 7 months ago

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

Actions #7

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 11.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/+/81586

Actions #8

Updated by Christian Kuhn 7 months ago

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

Also available in: Atom PDF