Skip to content

[!!!][FEATURE] Generate slug fields according to TCA configuration - #168

Merged
kszymukowicz merged 2 commits into
release/5.0.0from
slug
Oct 4, 2026
Merged

kszymukowicz merged 2 commits into
release/5.0.0from
slug

Conversation

@kszymukowicz

Copy link
Copy Markdown
Collaborator

After POST, PUT and PATCH operations all TCA fields of type slug of the persisted record are processed by TYPO3 SlugHelper the same way as DataHandler does it:

  • empty slug is generated according to the field configuration (generatorOptions, fallbackCharacter, prependSlash, ...),
  • non-empty slug is sanitized,
  • uniqueness rules from eval (unique, uniqueInSite, uniqueInPid) are applied.

Fields not mapped to any entity property are processed too, so clients do not need to send the slug at all.

Breaking change: slug values sent by the client are no longer stored as they are. They are sanitized and suffixed when not unique (e.g. my_news becomes my-news or my-news-1).

After POST, PUT and PATCH operations all TCA fields of type `slug` of the persisted record are processed by TYPO3 SlugHelper the same way as DataHandler does it:

- empty slug is generated according to the field configuration (`generatorOptions`, `fallbackCharacter`, `prependSlash`, ...),
- non-empty slug is sanitized,
- uniqueness rules from `eval` (`unique`, `uniqueInSite`, `uniqueInPid`) are applied.

Fields not mapped to any entity property are processed too, so clients do not need to send the slug at all.

Breaking change: slug values sent by the client are no longer stored as they are. They are sanitized and suffixed when not unique (e.g. `my_news` becomes `my-news` or `my-news-1`).
# Conflicts:
#	Documentation/Miscellaneous/Changelog/Index.rst
@kszymukowicz
kszymukowicz merged commit c704b3c into release/5.0.0 Oct 4, 2026
25 checks passed
@kszymukowicz
kszymukowicz deleted the slug branch October 4, 2026 19:46
@kszymukowicz kszymukowicz self-assigned this Oct 5, 2026
@kszymukowicz kszymukowicz added the enhancement New feature or request label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant