-
Notifications
You must be signed in to change notification settings - Fork 32
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
First Revision trigger #17
Comments
How do you add your meta fields? If you are using a plugin (like CMB2, carbon-fields, ...) they most likely rely on the If you're changing a core field (like content) besides a meta field a revision should be created also for the meta field. For me this is still the root cause I can't really use this plugin to revision meta fields. I also haven't found a proper solution for this since revisions are only created in the |
@tschortsch that's a good description of the current situation. One note is that 'save_post' fires twice on a normal save - once for the post and once for the revision. CPT hooks only fire once though ( |
@joelstransky I was actually unable to reproduce the issue you described. Was this on a custom post type? did you add the revisioned meta field to the whitelist using the filter? Here is a screencast where I try the steps you mentioned:
Revisions shows up in publish meta box. I click on revisions, restore the first revision. The meta is gone correctly. I open the revisions browser and restore the 2nd revision, meta is correctly reset to the revisioned value (currently does not show in the revisions ui, working on that). https://cl.ly/3o0W063C1Y1r/Screen%20Recording%202017-02-01%20at%2001.04%20PM.gif |
Interesting. It's been a while since I've looked at this. I'd have go back and look. Not something I'll have time to do in the near future. |
I think I found a workaround for the timing issue I described before:
With this it's not needed to change anything in the core directly. I think it should work with every Custom Field plugin which relies on the The only thing which has to be adjusted is the |
Great workaround @tschortsch - thanks! made a note of this for the future. |
This works perfectly unless there's no ACF filed exist. For the ACF field, the updated field appears in the previous revision. Any solution? |
Create new post, enter title and a custom field. Publish.
Change custom field value. Update
Expected: See Revisions link in Publish meta box.
Results: No Revisions link.
Revisions are not available until a change is made in the native fields.
The text was updated successfully, but these errors were encountered: