Skip to content
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

Outdated updatedAt values in edit view #10039

Open
franciscolourenco opened this issue Dec 18, 2024 · 0 comments
Open

Outdated updatedAt values in edit view #10039

franciscolourenco opened this issue Dec 18, 2024 · 0 comments
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@franciscolourenco
Copy link
Contributor

Describe the Bug

There are 2 related but maybe independent issues in this report:

  1. After saving a document with drafts disabled (or publishing a document with drafts enabled), the value of useField({path: 'updateAt'}) remains outdated until you reload the page. This is a regression from v2 or an earlier v3 version.
1.Outdated.useField.path-.updateAt.mp4
  1. In collections with drafts enabled, the "Last Modified" date shoes the modification of the published version, not of the draft. I would expect to see the modified date of the version that is currently being displayed.
2.Last.Modified.shows.published.at.mp4

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/compare/franciscolourenco:reproduce-updated-at

Reproduction Steps

1. Outdated useField({path: 'updateAt'})

  1. Publish a post
  2. Edit the post
  3. Publish the post again
  4. Observe that the updatedAt value unexpectedly didn't change in the custom component
  5. Reload the page
  6. Observe that the updatedAt value is now correct in the custom component

2. "Last Modified" displays modification date of published document instead of draft

  1. Publish a post
  2. Wait a minute
  3. Edit the post
  4. Save as a draft
  5. Observe that "Last Modified" shoes the modification date of the published version, not the draft.

Which area(s) are affected? (Select all that apply)

area: ui

Environment Info

Payload: v3.8.0
Next: 15.0.3
Node: v21.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant