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

When previewing any post, attached images lose their captions #24

Open
jonjennings opened this issue Jul 6, 2016 · 2 comments
Open

Comments

@jonjennings
Copy link

Many thanks for your plugin - it adds something that I think really should be fundamental to any multi-user workflow. However there's one small issue that's caused us some problems.

The plugin adds a hook on the_preview which calls BU_Version_Controller->preview()

This function is copying data from another post down over the content in the post being previewed - presumably to allow previewing how an alt version would look?

One side-effect of the way it currently works is that an attachment (eg a featured image) gets its excerpt overwritten by the excerpt of the post to which it's attached because this function gets called on the attachment's post ID.

As a result, images on our page previews lose their captions (because WP stores the caption of an image in its excerpt).

I'm afraid to propose changes to preview() and redirect_preview() because I don't understand how they fit into the existing functionality of the plugin, but could you find a way to make things a little more selective - so you don't disturb data on attachments, only the posts themselves?

As it is, we've had to disable that hook - which presumably has other issues.

@inderpreet99
Copy link
Contributor

Hi jonjennings,

I could not replicate this problem. I've tried the following your steps of creating a page with media and then changing that media in the alternate, but I did not have the problem. Can you provide clear steps to reproduce?

Thanks.

@jonjennings
Copy link
Author

Thanks for looking into this for us Inderpreet - I appreciate it. Unfortunately our client has deprioritized this issue so I don't have any official hours to follow-up on this at the moment. But I'll try & put together a clean example once I've got a little spare time.

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

No branches or pull requests

2 participants