Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Category:
Backend User Interface
Target version:
Start date:
2011-10-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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

patch31374.png (129 KB) patch31374.png Francois Suter, 2011-11-21 22:15
Actions #1

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

Actions #2

Updated by Francois Suter about 13 years ago

How to test: one typical such field is "Include static (from extensions)" in sys_template.

  1. go to mode Web > List
  2. display a list of templates, with at least one including several static files from extensions
  3. use the fields selector to add "Include static (from extensions)" to the list view
  4. observe that the fields where multiple items have been selected appear empty
  5. apply the patch and check the list view again: the fields should be filled as expected

Notes:

  1. 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
  2. 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)
Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

Updated by Francois Suter about 13 years ago

A screenshot to entice people to review ;-)

Actions #7

Updated by Francois Suter almost 13 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF