Project

General

Profile

Actions

Bug #75834

closed

removeItems, backendLayouts, pageTSconfig

Added by Stefan Froemken about 8 years ago. Updated over 5 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 2 (0 open2 closed)

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

Updated by Riccardo De Contardi almost 8 years ago

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

Updated by Wouter Wolters almost 8 years ago

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

Updated by R3 H6 over 7 years ago

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

Actions #4

Updated by Helmut Hummel over 6 years ago

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

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

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

Updated by Stefan Froemken about 6 years ago

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

Updated by Joschi Kuphal almost 6 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF