[TYPO3-core] RFC: #10442: Select doesn't allow comma in value

Oliver Hader oliver at typo3.org
Mon Feb 16 16:35:27 CET 2009


Hi Steffen,

Steffen Kamper schrieb:
> Hi,
> 
> This is SVN patch request.
> 
> Type: Bugfix
> 
> Branches: trunk
> 
> BT reference: http://bugs.typo3.org/view.php?id=10442
> 
> Problem:
> Select doesn't allow comma in value. This has a reason: multiselects
> (select with maxitems>1) are saved as comma-seperated list.
> Proceeding the value while save and read use an explode on the comma to
> seperate the values again.
> 
> This doesn't make sense for single selects. As they could be used also
> in a FCE, where the value isn't processed in an extension but passed
> directly to FE, usage of comma in value makes sense.
> 
> Solution:
> Attached patch differenciate between single and multiselect and explode
> the value only for selects having maxitems>1
> 
> Additional Information:
> I placed a test extension in BT. Install and create a test record
> ("fields") in a sysfolder.

The method
t3lib_TCEmain::checkValue_group_select_explodeSelectGroupValue() does
some more stuff like extracting the id from input values like
"123|The%20record%20title", where "123" is the information to be extracted.
This could occur on groub/db fields that allow only one relation
(maxitems=1) but different tables to be related.

Another problem I see is in updated extensions. Imagine a field once was
defined to accept more than one relation (maxitems>1), data was stored
in the database like "11,12,13" and then the field was changed to only
accept one relation (maxitems=1).
Then t3lib_transferData returns a non-valid element with the id
"11,12,13"...

Could you please point out, how the comma is used in FCEs for a single
element? Thanks in advance!

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list