-
Notifications
You must be signed in to change notification settings - Fork 179
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
Correctly filter revision fields for story revisions #12611
Conversation
Size Change: 0 B Total Size: 2.72 MB ℹ️ View Unchanged
|
Plugin builds for 7d25e75 are ready 🛎️!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpic, like phpdocs on tests but otherwise, looking good.
Further tests: Confirmed that going back in the revision history and restoring a previous version was successful. Also confirmed that comparing two arbitrary versions and restoring between them works as expected. Verified that restoration works across user-profiles: meaning when one user creates the original story, and another takes over editing, the revision mismatch is caught and restoring someone else's version is possible. Verified that with each restoration, the revision count within Document panel keeps incrementing as expected ! |
Context
When restoring a story from an autosave, the story content was not correctly restored.
This is because when filtering
_wp_post_revision_fields
, the post type can either beweb-story
orrevision
, and we didn't check for the latter.Summary
Correctly filter revision fields for story revisions by checking the post parent.
Relevant Technical Choices
To-do
User-facing changes
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
No
Does this PR change what data or activity we track or use?
No
Does this PR have a legal-related impact?
No
Checklist
Type: XYZ
label to the PRFixes #12547