Project

General

Profile

Actions

Bug #100733

closed

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

Added by Stephan Bauer over 1 year ago. Updated 5 months ago.

Status:
Closed
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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #101961: error: Undefined array key "data" in/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3759Closed2023-09-20

Actions
Actions #1

Updated by Oliver Hader over 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 over 1 year 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 over 1 year 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 about 1 year 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 about 1 year 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 about 1 year 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 about 1 year 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 about 1 year ago

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

Updated by Georg Ringer 6 months ago

  • Related to Bug #101961: error: Undefined array key "data" in/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3759 added
Actions #10

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF