Bug #85142

Recent reordering of TCA select items processing makes it impossible to post-process foreign_table items

Added by Joschi Kuphal over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2018-06-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

The recently introduced reordering of TCA select items processing (#75834) in typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php has moved the itemsProcFunc-processing before the addition of items from a foreign_table, effectively breaking the only way to post-process these items (i.e. rename, change value, etc.).

An example would be the post-processors for static_info_tables entities which don't work any longer (https://docs.typo3.org/typo3cms/extensions/static_info_tables/Manual/Index.html#alternate-value-fields-for-entity-selector).


Related issues

Related to TYPO3 Core - Bug #75834: removeItems, backendLayouts, pageTSconfigClosed2016-04-21

Actions
Related to TYPO3 Core - Bug #85622: itemsProcFunc in TCA -> select with foreign_table works not correctlyClosed2018-07-23

Actions
Related to TYPO3 Core - Bug #87569: itemsProcFunc in TCA in combination with used table not working correctNew2019-01-29

Actions
Related to TYPO3 Core - Bug #90925: Incorrectly selected items in MM select fieldsClosed2020-04-01

Actions
Has duplicate TYPO3 Core - Task #89600: [Bugfix] Reorder processing of TCA select items againClosed2019-11-07

Actions
#1

Updated by Joschi Kuphal over 3 years ago

  • Related to Bug #75834: removeItems, backendLayouts, pageTSconfig added
#2

Updated by Benni Mack over 3 years ago

  • Target version changed from 9.3 to Candidate for patchlevel
#3

Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57185

#4

Updated by Stefan Froemken over 3 years ago

IMO that is not a bug of TYPO3.
Please have a look at the old TYPO3 versions:

https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_4-7/t3lib/class.t3lib_tceforms.php#L1423:L1435

Order was, and should be: Filter, Add, UserFunc, Remove.
That ordering has changed while FormEngine refactoring for which reason I have created your mentioned patch to repair that ordering again.

It's the job of an integrator to decide which values should be visible or not.

Stefan

#5

Updated by Joschi Kuphal over 3 years ago

Hi Stefan,

I'm not sure if I understand your comment correctly or if we are referring to the same thing (or if it was intended for me at all).

Order was, and should be: Filter, Add, UserFunc, Remove.

I'm totally with you here. However, if you look at the current code (https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php#L48:L80) — please correct me if I'm wrong — then the order is something like this:

  1. Sanitize (/ Filter?)
  2. UserFunc
  3. Wild mixture of Add and Remove

There is no way to use the itemsProcFunc (step 2) for walking over the records added from a foreign table (happening in step 3), while this has always been possible in earlier versions (https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_4-7/t3lib/class.t3lib_tceforms.php#L1417). Don't you agree?

#6

Updated by Stefan Froemken over 3 years ago

You're right. Forget my post. I have interpreted the code wrong.

#7

Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57185

#8

Updated by Torben Hansen over 2 years ago

  • Related to Bug #85622: itemsProcFunc in TCA -> select with foreign_table works not correctly added
#9

Updated by Torben Hansen over 2 years ago

  • Related to Bug #87569: itemsProcFunc in TCA in combination with used table not working correct added
#10

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#11

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#12

Updated by Gerrit Code Review about 2 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#13

Updated by Gerrit Code Review about 2 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#14

Updated by Gerrit Code Review about 2 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#15

Updated by Gerrit Code Review about 2 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#16

Updated by Gerrit Code Review about 2 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#17

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#18

Updated by Gerrit Code Review about 2 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#21

Updated by Philip Heidenreich about 2 years ago

Patch set 1 for branch 9.5 does not work for static_languages or static_countries with custom index field. But a revert of changes from #75834 does.

#22

Updated by Gerrit Code Review almost 2 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#23

Updated by Gerrit Code Review almost 2 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57185

#24

Updated by Jigal van Hemert almost 2 years ago

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

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#26

Updated by Daniel Goerz almost 2 years ago

  • Has duplicate Task #89600: [Bugfix] Reorder processing of TCA select items again added
#27

Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#28

Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#29

Updated by Gerrit Code Review almost 2 years ago

Patch set 5 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#30

Updated by Gerrit Code Review almost 2 years ago

Patch set 6 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#31

Updated by Gerrit Code Review almost 2 years ago

Patch set 7 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61939

#32

Updated by Jigal van Hemert over 1 year ago

  • Status changed from Under Review to Resolved
#33

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
#34

Updated by Benni Mack over 1 year ago

  • Related to Bug #90925: Incorrectly selected items in MM select fields added

Also available in: Atom PDF