bu-ist / bu-versions

Make and save edits to published posts/pages in WordPress without immediately replacing the public content.
https://developer.bu.edu/bu-versions/
19 stars 5 forks source link

Question about built in revision system and BU Versions #17

Open ChongoShaun opened 9 years ago

ChongoShaun commented 9 years ago

I have an interesting use case that came up and I'm wondering if something is even possible with BU Versions.

When the user creates a clone page and makes edits, the first 'submit for approval' has no way to tell the difference between the very first version vs the new submitted version. However, if the user submits for approval again after another change, the built in revision system kicks in and you can now view diff's between both submissions. Is there any way to add the ability for the built in revision system to kick in on the very first 'submit for approval' ? this way administrators of the site can see the difference between the original version and the new copy before approving it and moving it live.

inderpreet99 commented 8 years ago

This is sort of a problem with the way WordPress handles drafts. When you first create a clone, BU Versions creates a draft alternate post. WordPress inherently doesn't record revisions for draft posts.

When the user "submits for review", the alternate post's status becomes pending. This is when WordPress begins tracking revisions. I don't think we can force WordPress to record revisions in draft mode. One possible solution could be to publish it and then mark it draft. WordPress should correctly keep track of the revisions after that. I'll give it a shot and mark this as an enhancement in the meantime.