Bug #75834
closedremoveItems, backendLayouts, pageTSconfig
100%
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
Updated by Riccardo De Contardi over 8 years ago
- Target version changed from 7.6.5 to Candidate for patchlevel
Updated by Wouter Wolters over 8 years ago
- Subject changed from removeItems, backendLayouts, pageTSconfig and Arghh to removeItems, backendLayouts, pageTSconfig
Updated by Remo H. almost 8 years ago
Struggle with this issue too. A solution would be great. Changing the order of method calls in TcaSelectItems would help.
Updated by Helmut Hummel about 7 years ago
- Related to Bug #82980: Handling of mixed string and 0 broken for keepItems and removeItems page ts added
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Stefan Froemken almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4da9b04a9be9d6bd98e9daf42c91cb9108ee0dda.
Updated by Joschi Kuphal over 6 years ago
- Related to Bug #85142: Recent reordering of TCA select items processing makes it impossible to post-process foreign_table items added