Bug #70197

Incorrect throwing of exception "Broken data structure on field name XXXXX section without type or vice versa is not allowed"

Added by Sven Wappler about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2015-09-30
Due date:
% Done:

0%

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

Description

In file sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php line 518 the condition

// type without section is not ok
} elseif (isset($dataStructureSheetElementDefinition['type']) || isset($dataStructureSheetElementDefinition['section'])) {

stands in contrast to the comment above and threrefore throws the exception "Broken data structure on field name XXXXX section without type or vice versa is not allowed"

Uncaught TYPO3 Exception
#1440685208: Broken data structure on field name pi_flexform. section without type or vice versa is not allowed (More information)

UnexpectedValueException thrown in file
/home/svewap/srv/www/vhosts/typo3webs/typo3_src-7.5.0/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php in line 519.

Files

example-1.xml (3.95 KB) example-1.xml Christian Sonntag, 2015-10-01 09:20
example-2.xml (4.03 KB) example-2.xml Christian Sonntag, 2015-10-01 09:20
#1

Updated by Christian Kuhn about 6 years ago

mmmh, maybe the comment is not precise enough: the "elseif" follows an "if" that checks for type=array and section=1, so this elseif hits if type=array but not section=1 or type!=array but section=1 ... both combination are not allowed (at least according to documentation).

however, i do not insist on this exception. it might be ok to just check for section=1 in the upper if and ignore the array thing altogether. i'm not 100% sure though if some other part of the code relies on this combination, so this would need investigation in case the exception is removed if you want this parsing relaxed a bit.

anyway, could you please show the xml snippet that triggered this exception for you?

#3

Updated by Morton Jonuschat about 6 years ago

  • Category set to FormEngine aka TCEforms
  • Status changed from New to Needs Feedback

Do you see the possibility to show the final XML that is being generated by all that FluidTYPO3 stuff? It would help debugging it.

#4

Updated by Christian Sonntag about 6 years ago

Hi.

I can give you some examples. The exception appears after updating from TYPO3 CMS 7.4.0 to TYPO3 CMS 7.5.0.

Regards

#6

Updated by Tobias Eichelberger about 6 years ago

I can reproduce it, by using flux/fluidcontent.
Works with 7.4, not with 7.5:

    <f:section name="Configuration">
        <flux:form id="brandteaser" options="{icon: '../assanIcon.png', group: 'Slider'}">
            <flux:form.section name="slideSection" >
                <flux:form.object name="slideObject" >
                    <flux:field.input name="link">
                        <flux:wizard.link activeTab="page"/>
                    </flux:field.input>
                    <flux:field.file name="image" allowed="jpg, jpeg, png, gif" maxItems="1" showThumbnails="1" />
                </flux:form.object>
            </flux:form.section>
        </flux:form>
    </f:section>

#7

Updated by Mathias Schreiber about 6 years ago

  • Status changed from Needs Feedback to Resolved

Hi guys,

I will close this ticket here.
Reasoning is that we work with XML and thus get strings back.
We do not want to strip down the strong comparison and, luckily, Claus already fixed the issue on the Flux side of things.

#8

Updated by Christian Weiske almost 6 years ago

This still happens with latest flux when using <flux:form.container> to group elements - see https://github.com/FluidTYPO3/flux/issues/992

In this case, it's not possible simply add a section configuration option to fix things. Christian seemed to be right when he wrote

it might be ok to just check for section=1 in the upper if and ignore the array thing altogether. i'm not 100% sure though if some other part of the code relies on this combination, so this would need investigation in case the exception is removed if you want this parsing relaxed a bit.

#9

Updated by Riccardo De Contardi about 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF