Skip to content

Fix updated at in seed script & unify page/post experience - #352

Merged
busbyk merged 5 commits into
mainfrom
fix-updated-at-seed
Jul 31, 2025
Merged

busbyk merged 5 commits into
mainfrom
fix-updated-at-seed

Conversation

@rchlfryn

@rchlfryn rchlfryn commented Jul 25, 2025 •

Copy link
Copy Markdown
Collaborator

Description

  • Adds the published_at field to applicable pages and posts in the seed script to ensure consistency in initial data.
  • Fixes an issue where the Published at date remained set when un-publishing a post. This change unifies un-publishing a post or page and will correctly clear the Published at date by setting it to null. the behavior between pages and posts, providing a consistent experience for publishing and un-publishing content

@busbyk busbyk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/collections/Posts/index.ts Resolved
@rchlfryn

rchlfryn commented Jul 25, 2025 •

Copy link
Copy Markdown
Collaborator Author

I'm still seeing the publishedAt field not populated on publish: https://www.loom.com/share/c079ad9a85f2485d89f8719c7a2a7564?sid=987033c0-f4f2-4cc2-8a6f-8ff4c54b211b

I noticed this too and chalked it up to a payload bug. Let me dig a big more.

@busbyk Update: it looks like autosave is to blame payloadcms/payload#10515

@rchlfryn
rchlfryn requested a review from busbyk July 25, 2025 22:43
@github-actions

Copy link
Copy Markdown
Contributor

@rchlfryn rchlfryn self-assigned this Jul 25, 2025
@busbyk

busbyk commented Jul 27, 2025

Copy link
Copy Markdown
Collaborator

I'm still seeing the publishedAt field not populated on publish: https://www.loom.com/share/c079ad9a85f2485d89f8719c7a2a7564?sid=987033c0-f4f2-4cc2-8a6f-8ff4c54b211b

I noticed this too and chalked it up to a payload bug. Let me dig a big more.

@busbyk Update: it looks like autosave is to blame payloadcms/payload#10515

Dang. That's disappointing. We might as well close this PR then but I'd like to keep #339 open - or open a new bug to track payloadcms/payload#10515 so we can upgrade once a fix is introduced.

@rchlfryn

Copy link
Copy Markdown
Collaborator Author

@busbyk I think we should push this PR because it is an improvement, but I will keep #339 open and update it

@busbyk

busbyk commented Jul 31, 2025

Copy link
Copy Markdown
Collaborator

#339

Sounds good to me.

@busbyk
busbyk enabled auto-merge July 31, 2025 19:14
@busbyk
busbyk added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit 9846fbc Jul 31, 2025
@busbyk
busbyk deleted the fix-updated-at-seed branch July 31, 2025 19:25
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