Actions
Bug #94655
closedSlug generation for records with pid=0 always returns "/"
Start date:
2021-07-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
I've added a slug field to records that have pid=0. The generated slug is always /
. The cause for this is a hardcoded check in the generate
function in TYPO3\CMS\Core\DataHandling\SlugHelper
:
if ($pid === 0 || (!empty($recordData['is_siteroot']) && $this->tableName === 'pages')) {
return '/';
}
The check for pid=0
makes sense for pages, but not for other record types.
I've checked this in TYPO3 10 and 11.
Actions