[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
Sat May 12 15:38:49 CEST 2007

This is a SVN patch request.

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.

Make sure that only the property 'CType' is checked and not every
property under 'tt_content_defValues'.

Thanks to Marc Bastian Heinrichs for pointing this behaviour.

Bugtracker reference:

Branches: TYPO3_4-1 & Trunk

Oliver Hader
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004226.patch
Type: text/x-diff
Size: 717 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070512/797810f6/attachment.bin 

More information about the TYPO3-team-core mailing list