Project

General

Profile

Actions

Bug #48968

closed

###PAGE_TSCONFIG_ID### not usable in rootUid TCA treeConfig

Added by Claus Harup almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2013-06-08
Due date:
% Done:

0%

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

Description

The documentation says:

"_rootUid (integer, optional) : uid of the record that shall be considered as the root node of the tree. In general this might be set by Page TSconfig_"

but my configuration:

TCEFORM.tx_tcshop_domain_model_product.categories.PAGE_TSCONFIG_ID = 523

does not get substitued!!!

I have been looking in the core and as fare as I can see this is not possible..... - have I missed something?


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #72961: TCA: using renderMode = tree, the treeConfig => rootUid can't get substituted with Page TSconfigClosed2016-01-27

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

Actions
Actions #1

Updated by Markus Klein almost 11 years ago

The PAGE_TSCONFIG_ID feature is not the right instrument here.
The PAGE_TSCONFIG_ID marker can be used in other configuration options, but seems not to be the intended one here.

The code in TreeDataProvideFactory.php only assigns the value of this property as integer:

if (isset($treeConfiguration['rootUid'])) {
    $dataProvider->setRootUid(intval($treeConfiguration['rootUid']));
}

I fear this is somewhat a missing feature.

Actions #2

Updated by Markus Klein almost 11 years ago

  • Category set to FormEngine aka TCEforms
Actions #3

Updated by Gone With the Wind almost 11 years ago

Trying to achieve something similar with a regular select field and ###PAGE_TSCONFIG_ID###, but the value is not replaced. Instead, there is an error message:

1: Attempt to insert record on page '[root-level]' (0) where this table, tx_kofomi_domain_model_locations, is not allowed

(The table in question is only allowed in sys-folders...)
Strangely enough, the error message refers to the 'parent' table, not the one that should gain a new entry - which anyway never shows up in the DB.
###CURRENT_PID### works (but is of no help).

TYPO3 CMS 6.1.1, php 5.4.10 (with XCache)

/// TCA

$TCA['tx_kofomi_domain_model_events'] = array(
[...],
'location' => array(
'exclude' => 0,
'label' => 'LLL:EXT:kofomi/Resources/Private/Language/locallang_db.xlf:tx_kofomi_domain_model_events.location',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_kofomi_domain_model_locations',
'foreign_table_where' => "ORDER BY tx_kofomi_domain_model_locations.name",
'size' => 5,
'autoSizeMax' => 10,
'minitems' => 0,
'maxitems' => 1,
'wizards' => array(
'_PADDING' => 2,
'_VERTICAL' => 1,
'_POSITION' => 'right',
'_DISTANCE' => 0,
'_VALIGN' => 'middle',
'suggest' => array(
'type' => 'suggest',
),
'edit' => array(
'type' => 'popup',
'title' => 'Edit location',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => array(
'type' => 'script',
'title' => 'Add new location',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_kofomi_domain_model_locations',
'pid' => '###PAGE_TSCONFIG_ID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
'list' => array(
'type' => 'script',
'title' => 'List locations',
'icon' => 'list.gif',
'params' => array(
'table' => 'tx_kofomi_domain_model_locations',
'pid' => '###PAGE_TSCONFIG_ID###',
),
'script' => 'wizard_list.php',
)
)
),
),
[...]
};

/// TCEFORM
TCEFORM.tx_kofomi_domain_model_events.location.PAGE_TSCONFIG_ID = 44

// Reference:
http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html
-> "Simple selector box with TSconfig markers"

Actions #4

Updated by Markus Klein almost 11 years ago

  • Status changed from New to Needs Feedback

Two things:
First, your add action for the wizard is configured to write to tx_kofomi_domain_model_locations, therefore it is clear, that new records are tried to be created there.
Second, the markers like ###PAGE_TSCONFIG_ID### are only replaced in the foreign_table_where value, nowhere else.

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions #6

Updated by Rémy DANIEL about 4 years ago

  • Related to Bug #72961: TCA: using renderMode = tree, the treeConfig => rootUid can't get substituted with Page TSconfig added
Actions #7

Updated by Rémy DANIEL about 4 years ago

  • Related to Feature #75037: renderType selectTree: allow marker like ###CURRENT_PID### for rootUid added
Actions

Also available in: Atom PDF