Project

General

Profile

Actions

Bug #94655

closed

Slug generation for records with pid=0 always returns "/"

Added by Rudy Gnodde over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #95485: Slug generation fails for non pages records when prefixParentPageSlug is activated in generatorOptionsClosedStefan Bürk2021-10-06

Actions
Actions

Also available in: Atom PDF