Skip to content

Conversation

@aerni
Copy link
Contributor

@aerni aerni commented Oct 17, 2025

This PR makes sure updated_at and updated_by get refreshed when you duplicate an entry in the CP.

Context

On one of my projects, entry slugs include a timestamp from when they were created, for example: ceiling-in-the-floor-1759364440. That timestamp comes from updated_at at the time the entry is created.

The issue was that when duplicating an entry, the duplicate kept the original entry’s updated_at and updated_by, which meant both entries ended up with the same timestamp in the slug.

This PR fixes that by giving duplicated entries a new updated_at and updated_by, so their slugs stay unique.

@aerni aerni changed the title Update updated_at and updated_by when duplicating an entry [5.x] Update updated_at and updated_by when duplicating an entry Oct 17, 2025
@jasonvarga jasonvarga merged commit cdccb54 into statamic:5.x Oct 17, 2025
24 checks passed
@aerni aerni deleted the fix/last-modified branch November 13, 2025 12:16
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.

2 participants