Bug #84708

Option "nonSelectableLevels" doesn't work in select fields with renderType "selectTree"

Added by Tobias Schmidt about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-04-12
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Setting the option nonSelectableLevels of treeConfig-Configuration in TCA overrides file has no effect. For example:

$GLOBALS['TCA']['pages']['columns']['categories']['config']['treeConfig']['appearance']['nonSelectableLevels'] = '0,1,2';

Categories are still selectable on level 0, 1 and 2.

Other options work as expected. For example:

$GLOBALS['TCA']['pages']['columns']['categories']['config']['treeConfig']['appearance']['expandAll'] = false;

I did check $node in method buildRepresentationForNode in file sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php. The value for property selectable is set correctly. So I guess there is a bug in the rendering of the select tree or in the related JavaScript.

Screen Shot 2018-09-13 at 10.55.24.png View (24.9 KB) Sebastian Michaelsen, 2018-09-13 10:56

Associated revisions

Revision 6a6fe299 (diff)
Added by Sebastian Michaelsen 8 months ago

[BUGFIX] Omit checkbox for unselectable tree items

TCA select fields with renderType = 'selectTree' have the option
treeConfig.appearance.nonSelectableLevels, which doesn't seem
to work anymore since TYPO3 v7. The items are correctly flagged
with node.selectable = false in PHP but the JavaScript doesn't
check for that property.

Resolves: #84708
Releases: master, 8.7
Change-Id: Iefe98e1c9fd316f05c27ad1230d63236a7069bf1
Reviewed-on: https://review.typo3.org/58263
Tested-by: TYPO3com <>
Reviewed-by: Joerg Kummer <>
Tested-by: Joerg Kummer <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Tymoteusz Motylewski <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision d0f85947 (diff)
Added by Sebastian Michaelsen 8 months ago

[BUGFIX] Omit checkbox for unselectable tree items

TCA select fields with renderType = 'selectTree' have the option
treeConfig.appearance.nonSelectableLevels, which doesn't seem
to work anymore since TYPO3 v7. The items are correctly flagged
with node.selectable = false in PHP but the JavaScript doesn't
check for that property.

Resolves: #84708
Releases: master, 8.7
Change-Id: Iefe98e1c9fd316f05c27ad1230d63236a7069bf1
Reviewed-on: https://review.typo3.org/58306
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Lorenz Ulrich about 1 year ago

I can confirm this. It used to work at least in TYPO3 6.2.

#2 Updated by Christian Hackl about 1 year ago

I can't confirm this, too.
It would be nice if the check-icon(s) are not shown of the nonSelectableLevels list.

#3 Updated by Sebastian Michaelsen 8 months ago

Confirmed. I got it running when I patched the SvgTree.js file. Then it works but it looks kind of off - I think there's an icon missing.

#4 Updated by Gerrit Code Review 8 months 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/58263

#5 Updated by Gerrit Code Review 8 months 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/58263

#6 Updated by Gerrit Code Review 8 months ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58306

#7 Updated by Anonymous 8 months ago

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

#8 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF