Bug #75834

removeItems, backendLayouts, pageTSconfig

Added by Stefan Froemken almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2016-04-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello Core-Team,

in privious TYPO3 Versions you have following structure:

if (isset($config['itemsProcFunc']) && $config['itemsProcFunc']) {
    $selItems = $this->procItems($selItems, $PA['fieldTSConfig']['itemsProcFunc.'], $config, $table, $row, $field);
}
// Possibly remove some items:
$removeItems = t3lib_div::trimExplode(',', $PA['fieldTSConfig']['removeItems'], 1);

Execute itemsProcFunc and THEN remove items by pageTSconfig

Now you have a structure like that:

$fieldConfig['config']['items'] = $this->removeItemsByKeepItemsPageTsConfig();
$fieldConfig['config']['items'] = $this->addItemsFromPageTsConfig();
$fieldConfig['config']['items'] = $this->removeItemsByRemoveItemsPageTsConfig();

...

$removedItems = array_diff_key($removedItems, $fieldConfig['config']['items']);

// Resolve "itemsProcFunc" 
if (!empty($fieldConfig['config']['itemsProcFunc'])) {
  $fieldConfig['config']['items'] = $this->resolveItemProcessorFunction();
}

Remove items defined by pageTSconfig and THEN execute itemsProcFunc.

So we can't remove items, which are generated by userFuncs anymore.

Next step: backend_layouts:
To remove the "none" entry, which was defined by TCA, we have to use removeItems. To remove entries, generated by itemsProcFunc, we have to use options.backendLayout.exclude. Not really userFriendly. BUT: That entry will be removed in BOTH select fields. That's not our goal. We only want to remove one entry from backend_layout and nothing more.

Maybe it would be a good start to differ them by adding a new option like:

options.backendLayoutNext.exclude

Stefan


Related issues

Related to TYPO3 Core - Bug #82980: Handling of mixed string and 0 broken for keepItems and removeItems page tsClosed2017-11-12

Actions
Related to TYPO3 Core - Bug #85142: Recent reordering of TCA select items processing makes it impossible to post-process foreign_table itemsClosed2018-06-02

Actions
Related to Static Info Tables - Bug #87906: itemsProcFunc_config -> indexField not working in TYPO3 9Needs FeedbackStanislas Rolland2019-03-13

Actions
#1

Updated by Riccardo De Contardi almost 5 years ago

  • Target version changed from 7.6.5 to Candidate for patchlevel
#2

Updated by Wouter Wolters almost 5 years ago

  • Subject changed from removeItems, backendLayouts, pageTSconfig and Arghh to removeItems, backendLayouts, pageTSconfig
#3

Updated by R3 H6 about 4 years ago

Struggle with this issue too. A solution would be great. Changing the order of method calls in TcaSelectItems would help.

#4

Updated by Helmut Hummel over 3 years ago

  • Related to Bug #82980: Handling of mixed string and 0 broken for keepItems and removeItems page ts added
#5

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

#6

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/55513

#7

Updated by Gerrit Code Review about 3 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/55513

#8

Updated by Gerrit Code Review about 3 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/55513

#9

Updated by Gerrit Code Review about 3 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/55513

#10

Updated by Stefan Froemken about 3 years ago

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

Updated by Joschi Kuphal over 2 years ago

  • Related to Bug #85142: Recent reordering of TCA select items processing makes it impossible to post-process foreign_table items added
#12

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
#13

Updated by Helge Funk about 1 year ago

  • Related to Bug #87906: itemsProcFunc_config -> indexField not working in TYPO3 9 added

Also available in: Atom PDF