Project

General

Profile

Actions

Bug #106069

open

TypoScript constants not available in addToList()

Added by Netresearch DTT GmbH 13 days ago. Updated 12 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2025-02-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a problem very similar to #102742 or maybe the same.

I have a constants.typoscript file

plugin {
    tx_myplugin{
        settings {
            myCustomPageDokType = 123
        }
    }
}

I also have the following entry in my User.tsconfig:

options.pageTree.doktypesToShowInNewPageDragArea := addToList({$plugin.tx_myplugin.settings.myCustomPageDokType})

The following is displayed in the configuration (BE_USER -> getTSConfig) view in the backend:

options.
    pageTree.
        doktypesToShowInNewPageDragArea = 1,6,4,7,3,254,199,{$plugin.tx_myplugin.settings.myCustomPageDokType}
<pre>

but should doktypesToShowInNewPageDragArea = 1,6,4,7,3,254,199,123
Actions #1

Updated by Garvin Hicking 13 days ago

  • Status changed from New to Needs Feedback

Thanks for your report!

To understand this - did this ever work in v11 ir v12
for you?

I'm not fully sure how userts and tsconfig constants are handled - for pagets and tsconfig constants this should be another case probably?

Actions #2

Updated by Netresearch DTT GmbH 12 days ago

In v11 and v12 (it would still work in v13), I have solved it so far using addUserTSConfig() in ext_localconf.php and calling a method there that returns the ID stored in the extension configuration (ext_conf_template.txt).

ExtensionManagementUtility::addUserTSConfig(
    'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . Configuration::geMyCustomPageDokType() . ')'
);

With v13, addUserTSConfig is deprecated and will be removed in v14:

Call to deprecated method addUserTSConfig() of class TYPO3\CMS\Core\Utility\ExtensionManagementUtility:
since TYPO3 v13.0, will be removed in TYPO3 v14.0

That's why I wanted to rebuild it.

Actions

Also available in: Atom PDF