Skip to content

beforeValidate hook changes still require page refresh to reflect changes with versions enabled. #10515

@HarleySalas

Description

@HarleySalas

Describe the Bug

I celebrated too early upon seeing #9691 and #10268, however, the issue still persists for me when versions are enabled for a collection.

when beforeValidate hooks run, their changes are not reflected in the UI until a user manually refreshes the page.

Link to the code that reproduces this issue

https://github.com/HarleySalas/payload-3-reproductions/tree/before-validate-requires-refresh

Reproduction Steps

clone the repo. sqlite contains the necessary data. You will be autologged in and you can visit the page collection to observe the behavior by removing the slug field and saving the document to get the slug to be generated via the Title field. Removing versions results in it working fine. As soon as it's got versions enabled, it just stops working and requires a full refresh to see changes reflected on the page.

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

area: core

Environment Info

Payload: 3.16.0
Node: 22.2.0
SQLite, Postgres 16

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions