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

Innaccurate information is being displayed when previewing draft posts. #27

Merged
merged 3 commits into from
Nov 14, 2016

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Nov 7, 2016

This change is fixing the issue for me on NM. I would love some input from someone who knows this plugin more intimately to confirm this won't cause any issues.

Related issue: #26.

@desrosj
Copy link
Contributor Author

desrosj commented Nov 7, 2016

When a $version_id is not supplied as a query argument, it is turning into 0 after being type casted as an integer. This is causing some issues with wp_get_post_autosave(), which is returning a somewhat random revision (I believe it is either a revision for the latest post retrieved, or the latest revision overall).

@sr4136 sr4136 closed this Nov 14, 2016
@sr4136 sr4136 reopened this Nov 14, 2016
@inderpreet99
Copy link
Contributor

This fix looks good to me.

Note: Other sites with the BU Versions plugin are properly adding in the version_id to make this work. For some reason, the Abroad site is not making it happen. Hence, it just picks up a random (BU Slideshow) revision from the DB. It's worth investigating why this happens in the future.

@desrosj
Copy link
Contributor Author

desrosj commented Nov 14, 2016

@inderpreet99 I will leave #26 open as an issue after we merge this to continue investigating.

@desrosj desrosj merged commit 7cb92bc into master Nov 14, 2016
@desrosj desrosj deleted the hotfix/innacurate-draft-previews branch November 14, 2016 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants