Bug #72961
closedStory #69617: FormEngine bugs
TCA: using renderMode = tree, the treeConfig => rootUid can't get substituted with Page TSconfig
100%
Description
Having:
'config' => array( 'type' => 'select', 'size' => 10, 'foreign_table' => 'pages', 'MM' => 'tx_tcshop_product_mm', 'MM_insert_fields' => array('ident' => 'category'), 'MM_match_fields' => array('ident' => 'category'), 'maxitems' => 9999, 'minitems' => 0, 'renderMode' => 'tree', 'treeConfig' => array( 'expandAll' => 1, 'parentField' => 'pid', 'rootUid' => ??????, 'maxLevels' => 5, 'appearance' => array( 'showHeader' => TRUE, 'nonSelectableLevels' => 0', ), ), ),
The rootUid = ????? can not be set via page TSConfig.
There was a similar issue in Typo3 6.2, see Bug #52672
Updated by Morton Jonuschat almost 9 years ago
- Target version changed from 7.6.3 to Candidate for patchlevel
Updated by Stefan Busemann almost 9 years ago
i can confirm that
TCEFORM.pages.categories.config.treeConfig.rootUid = XXX
works in TYPO3 6.2 but not anymore in 7 LTS.
Also it is not possible to overwrite this setting:
TCEFORM.pages.categories.config.treeConfig.appearance.expandAll = 0
Updated by Felix Nagel almost 9 years ago
Confirmed in TYPO3 7.6.2. Probably related to #73209
Updated by Andrea Herzog-Kienast over 8 years ago
As Stefan saied, this seems to work. But now it will even not work with 6.2.19.
If I set
TCEFORM.pages.categories.config.treeConfig.rootUid = 123
I get a fatal error while trying to edit page properties:
Uncaught TYPO3 Exception #1: PHP Catchable Fatal Error: Argument 2 passed to TYPO3\CMS\Backend\Utility\IconUtility::mapRecordTypeToSpriteIconClass() must be an array, null given, called in /html/typo3/typo3_src-6.2.19/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php on line 252 and defined in /html/typo3/typo3_src-6.2.19/typo3/sysext/backend/Classes/Utility/IconUtility.php line 841 (More information) TYPO3\CMS\Core\Error\Exception thrown in file /html/typo3/typo3_src-6.2.19/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 101.
Additional this config, which should only use categories fom a folder with ID 123, will not work, I see all categories from all pages.
Supplement:
If you add the ID of a category in pagetsconfig of a rootsite, in 6.2 you will get only this category and children
TCEFORM.pages.categories.config.treeConfig.rootUid = 5
But if you add something like this:
TCEFORM.pages.categories.config.treeConfig.rootUid = 5, 6, 7
you will only see category with UID 5 and Children, but not 6 and 7.
This whole stuff will NOT work with TYPO3 7.6.4
If you chose an ID for a catogory which does not exist in 6.2, the fatal error occurs, please see the error message above, and you can not edit the pageproperties, because of this error.
Updated by Gerrit Code Review over 8 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/47083
Updated by Gerrit Code Review over 8 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/47083
Updated by Gerrit Code Review over 8 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/47083
Updated by Gerrit Code Review over 8 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/47083
Updated by Stephan Bauer over 8 years ago
Patch does not work for me in 7.6.4
Other TCEFORM configurations like 'description.disabled = 1' works.
Updated by Gerrit Code Review over 8 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/47083
Updated by Gerrit Code Review over 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47799
Updated by Stefan Busemann over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6ccd5a0b0d62a9334a7a909fb58c69558e5a7a5c.
Updated by Rafal Brzeski almost 8 years ago
fatal error still occurs while trying to edit page properties on TYPO3 7.6.12,
please reopen this task.
#1: PHP Catchable Fatal Error: Argument 2 passed to TYPO3\CMS\Core\Imaging\IconFactory::getIconForRecord() must be of the type array, null given, called in /home/praca/source/typo3_src-7.6.12/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php on line 268 and defined in /home/praca/source/typo3_src-7.6.12/typo3/sysext/core/Classes/Imaging/IconFactory.php line 131
Updated by Franz Kugelmann over 7 years ago
Rafal Brzeski wrote:
fatal error still occurs while trying to edit page properties on TYPO3 7.6.12,
please reopen this task.[...]
Rafal, are you sure you have set an existing category id? We also got this fatal error, but realized we just defined a non-existing id.
Updated by Rémy DANIEL almost 5 years ago
- Related to Bug #48968: ###PAGE_TSCONFIG_ID### not usable in rootUid TCA treeConfig added