Should trashed content continue to reserve its slug? #2412
masonjames
started this conversation in
General
Replies: 1 comment 1 reply
|
Leaning towards 3. If restoration couldn't proceed because the slug has been reclaimed, we should just nullify it. I don't consider slug as a major data loss issue. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
PR #1814 fixes a seed re-application bug, but it raises a broader question about how trash should affect slugs.
Today, content tables enforce uniqueness on (slug, locale), including trashed rows, while normal lookups exclude those rows. This creates a mismatch:
The PR preserves the current behavior while handling it cleanly:
That fixes the crash, but should something in the trash prevent new live content from using the same slug?
I see three options:
Restoration still needs an explicit policy whichever option we choose:
My leaning is that trash should free the slug, and a conflicting restore should fail clearly rather than silently renaming unrelated live content. Rename-on-trash is probably the least disruptive implementation today, while live-only uniqueness is the cleaner long-term model.
I also think PR #1814 remains useful as a compatibility guard: existing databases already contain unsuffixed trashed rows, and seed application should not crash while the broader behavior is being decided.
All reactions