getProcessedValue does not work with items list and multiple selections
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 ;-)
Updated by Francois Suter almost 11 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
- 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)