Bug #94655

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

Added by Rudy Gnodde 3 months ago. Updated 19 days 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.

#1

Updated by Mathias Brodala 3 months ago

  • Description updated (diff)
#2

Updated by Gerrit Code Review 3 months 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/+/70122

#3

Updated by Gerrit Code Review 3 months ago

Patch set 2 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/+/70122

#4

Updated by Gerrit Code Review 3 months ago

Patch set 3 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/+/70122

#5

Updated by Gerrit Code Review 3 months ago

Patch set 4 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/+/70122

#6

Updated by Rudy Gnodde 2 months ago

  • Target version set to 11.4
#7

Updated by Gerrit Code Review 2 months ago

Patch set 5 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/+/70122

#8

Updated by Benni Mack about 2 months ago

  • Target version changed from 11.4 to 11 LTS
#9

Updated by Gerrit Code Review about 1 month ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71059

#10

Updated by Anonymous about 1 month ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#11

Updated by Benni Mack 19 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF