Bug #72961

Story #69617: FormEngine bugs

TCA: using renderMode = tree, the treeConfig => rootUid can't get substituted with Page TSconfig

Added by Steffen Wargalla over 6 years ago. Updated almost 4 years ago.

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

100%

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

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


Related issues

Related to TYPO3 Core - Bug #47040: Append treeConfig to allowOverrideMatrix whitelistClosedStefan Froemken2013-04-08

Actions
Related to TYPO3 Core - Bug #52672: TCA: using renderMode = tree, the treeConfig => rootUid cant get substituted with Page TSconfigClosed2013-10-10

Actions
Related to TYPO3 Core - Bug #75606: Override label of a flexform field with pageTSconfig not possible anymoreClosed2016-04-14

Actions
Related to TYPO3 Core - Feature #75037: renderType selectTree: allow marker like ###CURRENT_PID### for rootUidNew2016-03-13

Actions
Related to TYPO3 Core - Bug #71461: CategoryPermissionsAspect does not check changed rootUid of treeRejected2015-11-10

Actions
Related to TYPO3 Core - Bug #48968: ###PAGE_TSCONFIG_ID### not usable in rootUid TCA treeConfigClosed2013-06-08

Actions
#1

Updated by Morton Jonuschat over 6 years ago

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

Updated by Stefan Busemann over 6 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

#3

Updated by Felix Nagel over 6 years ago

Confirmed in TYPO3 7.6.2. Probably related to #73209

#4

Updated by Andrea Herzog-Kienast over 6 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.

#5

Updated by Gerrit Code Review over 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/47083

#6

Updated by Gerrit Code Review over 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/47083

#7

Updated by Gerrit Code Review over 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/47083

#8

Updated by Gerrit Code Review over 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/47083

#9

Updated by Mathias Schreiber over 6 years ago

  • Parent task set to #69617
#10

Updated by Stephan Bauer over 6 years ago

Patch does not work for me in 7.6.4

Other TCEFORM configurations like 'description.disabled = 1' works.

#11

Updated by Gerrit Code Review over 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/47083

#12

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

#13

Updated by Stefan Busemann over 6 years ago

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

Updated by Rafal Brzeski over 5 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
#15

Updated by Franz Kugelmann over 5 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.

#16

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed
#17

Updated by DANIEL Rémy over 2 years ago

  • Related to Bug #48968: ###PAGE_TSCONFIG_ID### not usable in rootUid TCA treeConfig added

Also available in: Atom PDF