Bug #70197
closed
Incorrect throwing of exception "Broken data structure on field name XXXXX section without type or vice versa is not allowed"
Added by Sven Wappler over 8 years ago.
Updated over 6 years ago.
Category:
FormEngine aka TCEforms
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
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?
- 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.
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
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>
- 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.
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.
- Status changed from Resolved to Closed
Also available in: Atom
PDF