Skip to content

Slug being generated, even when field is hidden #11564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ssyberg opened this issue Mar 12, 2025 · 2 comments
Open

Slug being generated, even when field is hidden #11564

ssyberg opened this issue Mar 12, 2025 · 2 comments

Comments

@ssyberg
Copy link

ssyberg commented Mar 12, 2025

Bug description

I'm trying to disable slugs on a subset of entries in a collection but new entires appear to still have slugs generated.

How to reproduce

  1. Create blueprint with a slug field, slug field is set to auto generate based on title, but conditionally visible based on a "has profile" boolean, if slug is hidden I expect it to be empty and remain empty
  2. Create collection with slugs set to not required
  3. Create a new entry with "has profile" false
  4. New entry is created and has slug set

Stranger still, and this is probably just something I don't understand about revisions, but I don't see a slug value set on the content record at all, but I do see it on the revision record

Logs

Environment

Environment
Application Name: <redacted>
Laravel Version: 10.48.27
PHP Version: 8.3.17
Composer Version: 2.8.6
Environment: local
Debug Mode: ENABLED
URL: <redacted>
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 4
Sites: 1
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.46.0 PRO

Statamic Addons
alt-design/alt-redirect: 1.3.3
aryehraber/statamic-logbook: 3.3.0
jacksleight/statamic-bard-texstyle: 3.4.1
stillat/relationships: 2.2.1

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@duncanmcclean
Copy link
Member

You'll need to remove the Slug field from your blueprint, instead of just marking it as hidden.

@ssyberg
Copy link
Author

ssyberg commented Mar 12, 2025

You'll need to remove the Slug field from your blueprint, instead of just marking it as hidden.

The slug is an optional field on this blueprint, removing it doesn't make sense.

@duncanmcclean duncanmcclean changed the title Slug generated on entries with no slug Slug still being generated, even when field is hidden. Mar 12, 2025
@duncanmcclean duncanmcclean changed the title Slug still being generated, even when field is hidden. Slug still being generated, even when field is hidden Mar 12, 2025
@duncanmcclean duncanmcclean reopened this Mar 12, 2025
@duncanmcclean duncanmcclean reopened this Mar 12, 2025
@duncanmcclean duncanmcclean changed the title Slug still being generated, even when field is hidden Slug being generated, even when field is hidden Mar 12, 2025
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

No branches or pull requests

2 participants