Project

General

Profile

Actions

Feature #94162

open

Update Slughelper to allow both dash and lodash Characters

Added by Markus Timtner almost 3 years ago. Updated 9 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Start date:
2021-05-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
routing fallbackCharacter
Complexity:
easy
Sprint Focus:

Description

Hi there,

at the moment, the slughelper converts both dash and lodash to the fallback character -

typo3/sysext/core/Classes/DataHandling/SlugHelper.php:115

// Convert some special tokens (space, "_" and "-") to the space character
$fallbackCharacter = (string)($this->configuration['fallbackCharacter'] ?? '-');
$slug = preg_replace('/[ \t\x{00A0}\-+_]+/u', $fallbackCharacter, $slug);
Page title with - and _ x
is converted to:
page-title-with-and-x

Since both Characters are valid for urls, it would be good if there would be at least the option to keep these characters,
so that the result would be

page-title-with-and-_-x


Files

core-10.4.21.patch (2.52 KB) core-10.4.21.patch Eric Harrer, 2021-12-06 15:09

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #94693: Slug fieldSeparator (and replacements) replaced by fallbackCharacterClosed2021-08-02

Actions
Actions #1

Updated by Benni Mack almost 3 years ago

  • Target version changed from 11.3 to 11.4
Actions #2

Updated by Christine Zoglmeier over 2 years ago

Working on it

Actions #3

Updated by Stefan Bürk over 2 years ago

@Christine Rochelt

Forget to note here ... I worked on it to .. but as you wrote in general/general in discord, and I'm in remote sprint/general did not see it.

I'm ready to push a patch, done the work with tests .. wrote in discord.

Should i push mine ? or how should we solve this "double work conflict" ?

Actions #4

Updated by Christine Zoglmeier over 2 years ago

Go ahead and push yours. I will compare your solution with mine.

Actions #5

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/+/70481

Actions #6

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/+/70481

Actions #7

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/+/70481

Actions #8

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/+/70481

Actions #9

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/+/70481

Actions #10

Updated by Gerrit Code Review over 2 years ago

Patch set 6 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/+/70481

Actions #11

Updated by Gerrit Code Review over 2 years ago

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

Actions #12

Updated by Benni Mack over 2 years ago

  • Target version changed from 11.4 to 12 LTS
Actions #13

Updated by Gerrit Code Review over 2 years ago

Patch set 8 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/+/70481

Actions #14

Updated by Gerrit Code Review over 2 years ago

Patch set 9 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/+/70481

Actions #15

Updated by Gerrit Code Review over 2 years ago

Patch set 10 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/+/70481

Actions #16

Updated by Gerrit Code Review over 2 years ago

Patch set 11 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/+/70481

Actions #17

Updated by Oliver Hader over 2 years ago

  • Related to Bug #94693: Slug fieldSeparator (and replacements) replaced by fallbackCharacter added
Actions #18

Updated by Eric Harrer over 2 years ago

Is it possible to extend the official support for this feature to typo3 10 and 11?

Based on this patch, I created a patch file for TYPO3 version 10. Maybe it will be of use to someone.

Actions #19

Updated by Simon Gilli over 2 years ago

@eric as we are talking about a feature here the chances are really small to get the permission for a backport. The policy is clear, no features are backported normally.

Actions #20

Updated by Gerrit Code Review almost 2 years ago

Patch set 12 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/+/70481

Actions #21

Updated by Oliver Hader over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #22

Updated by Benni Mack about 1 year ago

  • Target version changed from 12 LTS to Candidate for Major Version
Actions #23

Updated by Benni Mack 9 months ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF