Skip to content

fix(templates): slug field protection#12208

Open
LePulsar wants to merge 1 commit intopayloadcms:mainfrom
LePulsar:main
Open

fix(templates): slug field protection#12208
LePulsar wants to merge 1 commit intopayloadcms:mainfrom
LePulsar:main

Conversation

@LePulsar
Copy link

What?

It edits the SlugComponent in the website template to prevent slug edition if the document is already pusblished.

Why?

Contributors can accidentally change the slug if they change the title of a document. It can lead to SEO issues.

How?

By calling the hook useDocumentInfo() we can check if the document is already published.

@LePulsar LePulsar changed the title fix(template): Slug field Protection fix(templates): Slug field Protection Apr 24, 2025
@LePulsar LePulsar changed the title fix(templates): Slug field Protection fix(templates): slug field protection Apr 24, 2025
@github-actions github-actions bot added the stale label May 25, 2025
@github-actions github-actions bot removed the stale label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant