Skip to content

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

Description

@jonjennings

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions