[TYPO3-core] FYI24: #9479: Selected items are not visible after saving the form in BE

Dmitry Dulepov dmitry at typo3.org
Fri Oct 3 19:17:36 CEST 2008


Hi!

This is SVN patch request.

Type: bug, trivial but major

Branches: trunk, 4.2, 4.1

BT reference: http://bugs.typo3.org/view.php?id=9479

Problem: if a field in the $TCA has a multichoice select field with `itemsProcFunc` but without `items`, current values will not appear in the BE form after saving (the right part of the control will be empty). The problem is in t3lib_transferData class, which does not call `itemsProcFunc` if `items` is not set in $TCA. t3lib_TCEforms behaves correctly and always calls `itemsProcFunc` (even if `items` is empty). `items` field is not declared as "required" in "TYPO3 Core API" and therefore can be be omitted by a developer.

Solution: the attached patch fixes the issue and calls `itemsProcFunc` even if items are not set in the $TCA. This makes t3lib_transferData compatible with t3lib_TCEforms.

Notes: test extension is attached. It adds a new table named "Demo for bug #9474". Without the patch, selected values will not be visible after saving the record. With the patch values will be visible as expected.

The solution is trivial, therefore I plan to commit it in 24h if no one objects.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/duplicate_content_with_realurl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: T3X_user_missingitems-0_0_0-z.t3x
Type: application/octet-stream
Size: 10568 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081003/98fa2e43/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9479.diff
Type: text/x-diff
Size: 1292 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081003/98fa2e43/attachment-0001.diff 


More information about the TYPO3-team-core mailing list