Project

General

Profile

Actions

Bug #89390

closed

Slug generation: Fallback fields seems not to work

Added by Alex Kellner about 5 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2019-10-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3 9.5.9

Target: We want to use pages.nav_title for slug generation of pages and if nav_title is empty, title should be used instead.
Luckily there is a good documentation that describes this scenario exactly:
https://docs.typo3.org/m/typo3/reference-tca/9.5/en-us/ColumnsConfig/Type/Slug.html#generatoroptions

Problem: If pages.nav_title and pages.title is filled and the slug will be regenerated, values of both fields are used to fill the slug.

If I follow the recommendation, this TCA should work as described:

$GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'] = ['nav_title', 'title'];

The complete TCA for pages.slug:

The problem:

Actions #1

Updated by Alex Kellner about 5 years ago

The correct configuration would be:

$GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'] = [['nav_title', 'title']];

Please close this issue (and maybe a documentation update would be fine for the next integrator)

Actions #2

Updated by Georg Ringer about 5 years ago

  • Status changed from New to Closed
Actions #3

Updated by Daniel Siepmann about 5 years ago

There were Pull Requests fixing wrong documentation. Thanks for pointing out.

Actions #4

Updated by Sybille Peters about 1 year ago

  • Status changed from Closed to New
  • Assignee set to Sybille Peters

reopening, will create patch.

Changelog should be handled as core / issue patch, changelog is: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.html#examples

Changes for the "TCA References" should be handled as GitHub issues / PR, see


The examples 2 and 3 in the changelog are wrong: the configuration will result in concatenated slugs, but the results are shown as not concatenated.

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.5.x/Feature-87085-FallbackOptionsForSlugFields.html#examples

Using ['nav_title', 'title'] would not result in /best-products, but result in /best-products/products.

We could fix the examples like this:

Example 2:
Use [['nav_title', 'title']] instead of ['nav_title', 'title'] (which was probably the intention in the first place).

Actions #5

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

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

Actions #6

Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch 12.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/+/81726

Actions #7

Updated by Gerrit Code Review about 1 year ago

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

Actions #8

Updated by Sybille Peters about 1 year ago

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

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF