Bug #31374
closed
getProcessedValue does not work with items list and multiple selections
Added by Francois Suter about 13 years ago.
Updated about 7 years ago.
Category:
Backend User Interface
Description
t3lib_BEfunc::getProcessedValue() is used throughout the Core to transform values stored as indices into human-readable values.
However for select-type fields based on a list of items (and not a foreign table) where multiple selections are possible, t3lib_BEfunc::getProcessedValue() fails to display anything. This is due to t3lib_BEfunc::getLabelFromItemlist(), which is unable to handle several values. Although this is clearly documented in the phpDoc of the method, I still think that it's a bug and it's quite trivial to improve this situation.
Patch exists and will follow very soon ;-)
Files
- Status changed from Accepted to Under Review
Patch set 1 of change I5fa6f385a3efa11db9aae82399102e67a96ec700 has been pushed to the review server.
It is available at http://review.typo3.org/6370
How to test: one typical such field is "Include static (from extensions)" in sys_template.
- go to mode Web > List
- display a list of templates, with at least one including several static files from extensions
- use the fields selector to add "Include static (from extensions)" to the list view
- observe that the fields where multiple items have been selected appear empty
- apply the patch and check the list view again: the fields should be filled as expected
Notes:
- I chose to add a new method rather than enhancing t3lib_BEfunc::getLabelFromItemlist() to avoid possible compatibility breaks, since the return type is not the same
- I added a note in the phpDoc of the new method to indicated that it does not take itemsProcFunc into account. This means that it may still display wrong results in some cases. I figured that it was a bit too touchy to do this, since the influence of TSconfig should also be taken into account (after looking at how this is handled in TCEforms)
Patch set 1 of change I1421a52a5bd7cd8b73d9341551cdc3a862d0201c has been pushed to the review server.
It is available at http://review.typo3.org/6378
Patch set 1 of change I074099cd5fc06a346a86246bdf7620ebdc7b18cb has been pushed to the review server.
It is available at http://review.typo3.org/6379
Patch set 2 of change I5fa6f385a3efa11db9aae82399102e67a96ec700 has been pushed to the review server.
It is available at http://review.typo3.org/6370
A screenshot to entice people to review ;-)
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF