Bug #90645
closed###CURRENT_PID### does not contain table.pid but actually pages.uid (and thus does not work for for pages.pid)
100%
Description
When using the marker ###CURRENT_PID###
, for example in the Suggest wizard of the group field, it does not contain "current table.pid
" but actually the "current pages.uid
". This is wrong or atleast very misleading becasue you can not get the parent page when using allowed => pages
.
I tried to suggest all parallel pages of the current page by using
'pages' => [
'addWhere' => 'AND pid = ###CURRENT_PID###'
]
But this only suggest child pages, not sibling/parallel pages. This is becasue ###CURRENT_PID###
actually contains the uid of the current page and not the content of the field table.pid
(the "current pid" when acting on table pages
) like the marker name reads.
Updated by S P over 4 years ago
Additional note: My group field is in the TCA of table pages
, if this was not clear.
Updated by Gerrit Code Review over 4 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/c/Packages/TYPO3.CMS/+/63603
Updated by Oliver Bartsch over 4 years ago
Code to test (TCA/Overrides/pages.php):
<?php
defined('TYPO3_MODE') || die();
call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages',
[
'group_db_pages' => [
'label' => 'group_db_pages allowed=pages',
'description' => 'pages on current page',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'pages',
'size' => 1,
'suggestOptions' => [
'pages' => [
'addWhere' => 'AND pid = ###CURRENT_PID###'
]
]
]
]
]
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'group_db_pages');
});
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63587
Updated by Susanne Moog over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8d0c0bf123c37855bd742bd1ae39e9d3d1c5ae0e.