Commit 8d0c0bf1 authored by Susanne Moog's avatar Susanne Moog Committed by Benni Mack
Browse files

[BUGFIX] Use parent page ID as PID for suggest fields

TCA select fields have the capabilities for replacing ###CURRENT_PID###
with the parent page ID of the current record. This should always be
<table>.pid. In case of pages the wrong ID was used.

This was now changed to always use the parent page ID indepentent of
the current record. In case there is no parent page row, 0 is given.

Resolves: #90645
Releases: master, 9.5
Change-Id: I8bc04891a009011f4c0d7fd9e59ab306d650b4d2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63603

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent b8feea36
......@@ -286,7 +286,7 @@ class GroupElement extends AbstractFormElement
$html[] = ' data-tablename="' . htmlspecialchars($table) . '"';
$html[] = ' data-field="' . htmlspecialchars($elementName) . '"';
$html[] = ' data-uid="' . htmlspecialchars($this->data['databaseRow']['uid']) . '"';
$html[] = ' data-pid="' . htmlspecialchars($this->data['effectivePid']) . '"';
$html[] = ' data-pid="' . htmlspecialchars($this->data['parentPageRow']['uid'] ?? 0) . '"';
$html[] = ' data-fieldtype="' . htmlspecialchars($config['type']) . '"';
$html[] = ' data-minchars="' . htmlspecialchars($suggestMinimumCharacters) . '"';
$html[] = ' data-datastructureidentifier="' . htmlspecialchars($dataStructureIdentifier) . '"';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment