Bug #31374
closedgetProcessedValue does not work with items list and multiple selections
100%
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
Updated by Mr. Hudson about 13 years ago
- 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
Updated by Francois Suter about 13 years ago
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)
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change I1421a52a5bd7cd8b73d9341551cdc3a862d0201c has been pushed to the review server.
It is available at http://review.typo3.org/6378
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change I074099cd5fc06a346a86246bdf7620ebdc7b18cb has been pushed to the review server.
It is available at http://review.typo3.org/6379
Updated by Mr. Hudson about 13 years ago
Patch set 2 of change I5fa6f385a3efa11db9aae82399102e67a96ec700 has been pushed to the review server.
It is available at http://review.typo3.org/6370
Updated by Francois Suter about 13 years ago
- File patch31374.png patch31374.png added
A screenshot to entice people to review ;-)
Updated by Francois Suter almost 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8803e680d2144b6629e0ec075e6785a1da8d1147.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed