Task #53045
closedMake \TYPO3\CMS\Core\Category\CategoryRegistry::getCategoryFieldsForTable() reusable
100%
Description
Currently the \TYPO3\CMS\Core\Category\CategoryRegistry::getCategoryFieldsForTable()
method throws an Exception if the menu_type of the current row is not set to 9
.
This is not very nice and not reusable.
It would be much better if you could simply configure the table name in the TCA that is calling the method so that it looks like that (TCA property name can be disussed):
'category_field' => array( 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:category_field', 'config' => array( 'type' => 'select', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, 'suppress_icons' => 1, 'itemsProcFunc' => 'TYPO3\\CMS\\Core\\Category\\CategoryRegistry->getCategoryFieldsForTable', 'relatedCategoryTable' => 'pages', ) )
Additionally we should think about removing the Exception because it will break the Backend for all Extensions / configurations that enhance the menu_type list with their own types and do not already have added the category fields (selected_categories
, category_field
) to the subtypes_excludelist
configuration.
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Gerrit Code Review about 11 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/24968
Updated by Gerrit Code Review almost 11 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/24968
Updated by Gerrit Code Review over 10 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/24968
Updated by Gerrit Code Review over 10 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/24968
Updated by Gerrit Code Review over 10 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/24968
Updated by Gerrit Code Review about 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968
Updated by Gerrit Code Review over 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968
Updated by Gerrit Code Review over 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968
Updated by Gerrit Code Review over 9 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968
Updated by Gerrit Code Review about 9 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968
Updated by Gerrit Code Review about 9 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968
Updated by Gerrit Code Review about 9 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Gerrit Code Review almost 9 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Gerrit Code Review almost 9 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Gerrit Code Review almost 8 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Gerrit Code Review almost 8 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Gerrit Code Review almost 8 years ago
Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968
Updated by Anja Leichsenring almost 8 years ago
- Description updated (diff)
- Sprint Focus set to On Location Sprint
Updated by Alexander Stehlik almost 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 36f8765aa340c364f7b7edfa967549c683f21747.
Updated by Christian Kuhn almost 8 years ago
- Status changed from Resolved to New
Updated by Christian Kuhn almost 8 years ago
- Complexity changed from medium to hard
Updated by Marc Bastian Heinrichs over 7 years ago
Run into this lately and also thought about a flexible solution. A really hard one.
Updated by Anja Leichsenring about 7 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Susanne Moog over 5 years ago
- Status changed from New to Needs Feedback
Can someone add some more info: What shall be achieved? What problem will be solved? How can the problem be reproduced?
Updated by Alexander Stehlik over 5 years ago
The problem is pretty much solved I guess in current TYPO3 versions, at least at a record type level basis.
In the old days, when the menu types were not separate content elements there was no mechanism to add your own category based menu types. The menu types and their associated tables were (and still are as a fallback) hardcoded in the CategoryRegistry->getCategoryFieldsForTable()
method.
The goal of my patch back then was to create a mechanism that allowed a flexible detection of the categorized table.
Today there already exists a mechanism with the table
parameter for the itemsProcConfig
and the columnsOverrides
mechanism in the types
config of the TCA.
It is still not possible to change the related category table based on subtypes but I think that is an edge case and can be ignored.
From my perspective this issue is solved.
Updated by Riccardo De Contardi over 5 years ago
- Status changed from Needs Feedback to Closed
@Alexander Stehlik I must thank you for your feedback; I close this issue for now.
If you think that this is the wrong decision or that there is still work to be done on this topic, please reopen it or open a new issue with a reference to this one (or ping me and I'll reopen it)
Thank you.