[TYPO3-core] RFC: Bug 4226: New content elements wizard removes CE from array if tt_content_defValues property is zero

Ingmar Schlecht ingmar at typo3.org
Sat May 12 15:42:24 CEST 2007


Makes sense.

+1 on the code.

I expect functional testing has been done by the bug-reporter.

cheers
Ingmar


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
> 
> 
> olly
> 


More information about the TYPO3-team-core mailing list