[TYPO3-core] RFC: Bug 4226: New content elements wizard removes CE from array if tt_content_defValues property is zero
Oliver Hader
oh at inpublica.de
Tue Jun 5 11:56:46 CEST 2007
FYI: Committed to SVN - TYPO3_4-1 (rev. 2356) and Trunk (rev. 2357)
olly
Oliver Hader schrieb:
> This is a SVN patch request.
>
> Problem:
> Imagine a content element like the following:
> [common_textImage] => Array
> (
> [icon] => ...
> [title] => ...
> [description] => ...
> [tt_content_defValues] => Array
> (
> [CType] => textpic
> [imageorient] => 17
> [someOtherProperty] => 0
> )
> )
> In db_new_content_el.php elements are removed by executing this piece of
> code 'in_array($fV,$removeItems)' - where $fV is the field value of the
> properties in the 'tt_content_defValues' part of the wizard item.
> If any of these properties (in this case 'someOtherProperty') is set to
> zero, 'in_array(0, $removeItems)' returns true and removes the item.
>
> Solution:
> Make sure that only the property 'CType' is checked and not every
> property under 'tt_content_defValues'.
>
> Comments:
> Thanks to Marc Bastian Heinrichs for pointing this behaviour.
>
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=4226
>
> Branches: TYPO3_4-1 & Trunk
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-team-core
mailing list