Project

General

Profile

Actions

Bug #94655

closed

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

Added by Rudy Gnodde over 2 years ago. Updated over 2 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 #1

Updated by Mathias Brodala over 2 years ago

  • Description updated (diff)
Actions #2

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

Actions #3

Updated by Gerrit Code Review over 2 years 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

Actions #4

Updated by Gerrit Code Review over 2 years 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

Actions #5

Updated by Gerrit Code Review over 2 years 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

Actions #6

Updated by Rudy Gnodde over 2 years ago

  • Target version set to 11.4
Actions #7

Updated by Gerrit Code Review over 2 years 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

Actions #8

Updated by Benni Mack over 2 years ago

  • Target version changed from 11.4 to 11 LTS
Actions #9

Updated by Gerrit Code Review over 2 years 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

Actions #10

Updated by Anonymous over 2 years ago

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

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed
Actions #12

Updated by Stefan Bürk over 2 years ago

  • Related to Bug #95485: Slug generation fails for non pages records when prefixParentPageSlug is activated in generatorOptions added
Actions

Also available in: Atom PDF