[FEATURE] Add inline AJAX validation for TCA type slug
The TCA type slug field is "disabled" / "readonly" by default but
actually has a toggle button (like InputLinkField) to enable that field.
For new records it works like this:
- A title is entered, then the slug field gets prefilled "as-you-type"
and the editor will see the URL directly. There is a check if the
- If a slug is manually entered:
- It is validated by "isUniqueInSite" to see if that slug is still
- If the slug is already taken, a proposal is shown below the input
field to use the proposal for the slug. In any case, when saving,
the same validation process kicks in anyways.
Existing records do not change their slug by changing the page title,
but only if the slug field gets modified directly.
So for existing records, the following use-cases exist, when a slug
gets manually modified:
- If the page slug is already in use, a proposal for another
available slug is shown.
- If the page has subpages, a warning will be shown that all
subpages need to be manually modified (not implemented yet)
- If the page slug will be changed on save, a message is shown that you
should create a redirect (not implemented yet)
Reviewed-by: Frans Saris <email@example.com>
Tested-by: Frans Saris <firstname.lastname@example.org>
Tested-by: TYPO3com <email@example.com>
Reviewed-by: Benni Mack <firstname.lastname@example.org>
Tested-by: Benni Mack <email@example.com>