Project

General

Profile

Actions

Bug #85142

closed

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

Added by Joschi Kuphal almost 6 years ago. Updated almost 4 years 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 5 (1 open4 closed)

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
Actions #1

Updated by Joschi Kuphal almost 6 years ago

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

Updated by Benni Mack almost 6 years ago

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

Updated by Gerrit Code Review almost 6 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

Actions #4

Updated by Stefan Froemken almost 6 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

Actions #5

Updated by Joschi Kuphal almost 6 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?

Actions #6

Updated by Stefan Froemken over 5 years ago

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

Actions #7

Updated by Gerrit Code Review over 5 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

Actions #8

Updated by Torben Hansen almost 5 years ago

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

Updated by Torben Hansen almost 5 years ago

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

Updated by Gerrit Code Review over 4 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

Actions #11

Updated by Gerrit Code Review over 4 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

Actions #12

Updated by Gerrit Code Review over 4 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

Actions #13

Updated by Gerrit Code Review over 4 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

Actions #14

Updated by Gerrit Code Review over 4 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

Actions #15

Updated by Gerrit Code Review over 4 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

Actions #16

Updated by Gerrit Code Review over 4 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

Actions #17

Updated by Gerrit Code Review over 4 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

Actions #18

Updated by Gerrit Code Review over 4 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

Actions #21

Updated by Philip Heidenreich over 4 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.

Actions #22

Updated by Gerrit Code Review about 4 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

Actions #23

Updated by Gerrit Code Review about 4 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

Actions #24

Updated by Jigal van Hemert about 4 years ago

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

Updated by Gerrit Code Review about 4 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

Actions #26

Updated by Daniel Goerz about 4 years ago

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

Updated by Gerrit Code Review about 4 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

Actions #28

Updated by Gerrit Code Review about 4 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

Actions #29

Updated by Gerrit Code Review about 4 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

Actions #30

Updated by Gerrit Code Review about 4 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

Actions #31

Updated by Gerrit Code Review about 4 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

Actions #32

Updated by Jigal van Hemert about 4 years ago

  • Status changed from Under Review to Resolved
Actions #33

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed
Actions #34

Updated by Benni Mack almost 4 years ago

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

Also available in: Atom PDF