Bug #94655
closedSlug generation for records with pid=0 always returns "/"
100%
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.
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review about 3 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
Updated by Benni Mack about 3 years ago
- Target version changed from 11.4 to 11 LTS
Updated by Gerrit Code Review about 3 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
Updated by Anonymous about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1ab5841a3c58291e7be3ae50e633f60066a1ce72.
Updated by Stefan Bürk about 3 years ago
- Related to Bug #95485: Slug generation fails for non pages records when prefixParentPageSlug is activated in generatorOptions added