Project

General

Profile

Actions

Feature #25113

closed

itemsProcFunc is not taken into account while generating labels for select items in the list module

Added by Jo Hasenau almost 14 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2011-02-20
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

Description

While working with records listings in the list module you can activate different fields to be shown in the list of records of any table that is present in the current page.

Attached patch will apply the itemsProcFunc before using t3lib_BEfunc::getProcessedValueExtra to make sure the array of items matches the one that is used by the page module.

The list will show checkbox, radio and/or select fields as well and display the selected values for each record in the list.

But this display does not respect any changes to the list done by itemsProcFunc although the labels are changed when you open a record to edit it. This results in a completely different set of labels used by the list module, which can be easily triggered when using the new grid view.

While there are lots of new columns and labels available in the page module, there is still just Left, Normal, Right, Border for the values 1,0,2,3 in the list view, leaving the rest of the possible values with an empty label.
(issue imported from #M17682)


Files

17682.diff (1.49 KB) 17682.diff Administrator Admin, 2011-02-20 14:07
Cattura.PNG (26.4 KB) Cattura.PNG Riccardo De Contardi, 2019-06-27 16:01
Screenshot 2024-01-27 alle 15.39.50.png (57.1 KB) Screenshot 2024-01-27 alle 15.39.50.png Riccardo De Contardi, 2024-01-27 14:44

Related issues 8 (0 open8 closed)

Related to TYPO3 Core - Feature #42457: Backend layout & page content wizardClosed2012-10-28

Actions
Related to TYPO3 Core - Bug #45833: BE List Module - issues with call to itemsProcFunc and non-selected fieldsClosed2013-02-25

Actions
Related to TYPO3 Core - Bug #50581: File-Mounts: TCA issueClosed2013-07-31

Actions
Related to TYPO3 Core - Bug #100855: TCA type radio with itemsProcFunc doesn't show information in list view nor in export CSVClosed2023-05-10

Actions
Related to TYPO3 Core - Bug #102616: TCA type selectSingle with itemsProcFunc doesn't show information in list view nor in export CSVClosed2023-12-06

Actions
Has duplicate TYPO3 Core - Bug #25158: List module + backend layout + tt_content: column titlesClosedOliver Hader2011-02-24

Actions
Has duplicate TYPO3 Core - Bug #55166: label_alt does not work with itemsProcFuncClosed2014-01-20

Actions
Has duplicate TYPO3 Core - Bug #64851: List module backend layout column titlesRejected2015-02-04

Actions
Actions #1

Updated by Jo Hasenau almost 14 years ago

pending in core list

Actions #2

Updated by Tomas Mrozek over 13 years ago

Patch tested and it seems to do the job. Thanks Jo!

Actions #3

Updated by Jo Hasenau over 13 years ago

So can you give a +1 in the core list please?

Actions #4

Updated by Gerrit Code Review almost 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16815

Actions #5

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16838

Actions #6

Updated by Gerrit Code Review almost 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16838

Actions #7

Updated by Gerrit Code Review almost 12 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16838

Actions #8

Updated by Gerrit Code Review almost 12 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16838

Actions #9

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at http://review.typo3.org/16917

Actions #10

Updated by Gerrit Code Review almost 12 years ago

Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16815

Actions #11

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/16920

Actions #12

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/16921

Actions #13

Updated by Gerrit Code Review almost 12 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/16921

Actions #14

Updated by Gerrit Code Review almost 12 years ago

Patch set 2 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/16920

Actions #15

Updated by Gerrit Code Review almost 12 years ago

Patch set 3 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16815

Actions #16

Updated by Martin Kästner almost 12 years ago

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

Updated by Christian Kuhn over 11 years ago

  • Status changed from Resolved to New
  • Target version deleted (0)
Actions #18

Updated by Christian Kuhn over 11 years ago

This patch introduced regressions and is reverted in all versions for now:

We have problems with multiple extensions: For example we see warnings in list module with direct_mail and imagecycle, and ext:realty throws a db error.

Most warnings can be fixed pretty easily by making sure the first parameter ($items) is an array. In tcemain, this is ensured by initItemArray() that is called on $items before they are fed to procItem. A simple fix in list module would be:

$items = is_array($fieldSetup['config']['items']) ? $fieldSetup['config']['items'] : array();
$GLOBALS['TCA'][$table]['columns'][$field]['config']['items'] = $formEngine->procItems(
   $items,
   ...

But the realty db error is not fixed by that and digging into this leads deep into the rabbit-hole. A new patch should at least do these things (grepped from the surrounding calling code of procItem calls in tcemain):
  • config['displayCond'] must be evaluated. For example ext:realty executes the itemsProcFunc for select only, if dispalyCond "$city > 0" is true.
  • The list module does not work with select * of the database row in question, but only has the fields that are actually shown. tcemain always works with the whole $row, so list module must fetch complete row if calling itemProc(), too.
  • As far as I can see from tcemain, itemProc is only called for tca types select, radio and check. Entry methods in tcemain are the getSingleField_type* methods.
  • initItemArray() must be called before calling procItem()
  • If config = select, further additional things must be done: addSelectOptionsToItemArray(), keepItems handling, addItems handling, removeItems handling (after procItems call). They should all work and have several funny dependencies that all must be checked.

Imho the above list is definately not trivial and a real fix should probably even clean up things in tcemain before, to simplify the whole stuff for easier re-usage in list module or at other places where rows are shown.

As a result, I'll for now have to revert the patch in all versions. Furthermore, the issue is now marked as "feature" and will not be backported to stable versions again to not risk another regression again.

Would be great if someone could work on all this stuff.

Actions #19

Updated by Christian Kuhn over 11 years ago

  • Tracker changed from Bug to Feature
Actions #20

Updated by Ernesto Baschny over 11 years ago

Thanks for the analysis and reverting the change, Christian. I've stumbled over that bug also starting with 4.5.23.

For the record: the buggy behaviour introduced by this change started in

  • 4.5.23
  • 4.6.16
  • 4.7.8
  • 6.0.1

And will now be fixed in the next releases:

  • 4.5.26
  • 4.7.11
  • 6.0.5

Cheers,
Ernesto

Actions #21

Updated by Christian Kuhn over 11 years ago

Thx Ernesto. Actually, I reverted this one also in 4.6, just in case we are forced to still release another 4.6 again I don't want the regression to be in there.

Actions #22

Updated by Michael Stucki over 9 years ago

I'm currently stuck at this problem. Tried the original patch which has many flaws, as Christian already pointed out.

A solid fix for the problem would probably require additional configuration flags to enable/disable the processing for each entry, because otherwise this can likely become a performance killer.

In my case however, it would already be enough if the value is displayed as stored in the database:

                unset($GLOBALS['TCA'][$table]['columns'][$field]['config']['items']);
                unset($GLOBALS['TCA'][$table]['columns'][$field]['config']['itemsProcFunc']);
                $GLOBALS['TCA'][$table]['columns'][$field]['config']['type'] = 'text';

Does that sound acceptable as a workaround? At least it's better than an empty value, which is currently the case...

Let me know then I'll prepare a patch.

Actions #23

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Backend User Interface
Actions #24

Updated by Susanne Moog about 7 years ago

  • Related to deleted (Bug #64851: List module backend layout column titles)
Actions #25

Updated by Susanne Moog about 7 years ago

  • Has duplicate Bug #64851: List module backend layout column titles added
Actions #26

Updated by Riccardo De Contardi over 5 years ago

I tried the following test with TYPO3 9.5.8 and the latest version of gridelements

1) Install EXT:gridelements and check "Enable nesting in list module" in its configuration
2) Create a new Backend Layout item with three colPos:

  • 0 with label "Main"
  • 1 with label "Bottom"
  • 100 with label "Other"

3) Create a new CE Backend Layout with two colPos:

  • 200 with label "Left pos 200"
  • 201 with label "Right pos 201"

4) assign the BE layout to a page; create some content in it and add also a Gridelement CE; put some content in it
5) Switch to List view

Results:

  • the labels of the Backend Layout are taken ("Default", "Bottom", "Other")
  • the labels of the CE Backend layout are not shown; just "200" and "201"

See attached Cattura.PNG screenshot.

Actions #27

Updated by Riccardo De Contardi 10 months ago

Sorry for neglecting this one for so long; I repeated the test on my last comment under the following conditions:

- TYPO3 11.5.34
- GridElements 11.1.0

The result is that the list module feels much much cleaner and all the labels seem correctly displayed (see attached file Screenshot 2024-01-27 alle 15.39.50.png)

Actions #28

Updated by Riccardo De Contardi 10 months ago

  • Status changed from New to Closed

I close this issue for now in agreement with the reporter as it is quite old and seems solved.

If you think that this is the wrong decision or experience the issue again please reopen it or open a new issue with a reference to this one.

Thank you.

Actions #30

Updated by Benni Mack 10 months ago

  • Related to Bug #100855: TCA type radio with itemsProcFunc doesn't show information in list view nor in export CSV added
Actions #31

Updated by Benni Mack 10 months ago

  • Related to Bug #102616: TCA type selectSingle with itemsProcFunc doesn't show information in list view nor in export CSV added
Actions

Also available in: Atom PDF