distributor icon indicating copy to clipboard operation
distributor copied to clipboard

Unlinking distributed posts breaks image galleries

Open gregbarbosa opened this issue 7 years ago • 2 comments

Description

We'll often use image galleries inside of our posts on our sites. When these posts are distributed, they may be unlinked on the destination site. The resulting destination post will break all galleries.

Steps to Reproduce

  1. Create a post on site A
  2. Distribute post to site B as a draft
  3. Head to draft on site B
  4. Unlink distributed post from originating site (Site A)

Expected Behavior

Image galleries remain intact

Actual Behavior

Image galleries break, treating images as individual entities in the post.

Notes

Site A's image gallery shortcode [gallery type="rectangular" ids="412760,412761"]

Site B's image gallery (after unlinking from site A) Note that it breaks the shortcode format and reverts to standard HTML.

<div class="tiled-gallery type-rectangular tiled-gallery-unresized">
<div class="gallery-row" style="width: 1000px; height: 362px;">
<div class="gallery-group images-1" style="width: 541px; height: 362px;">
<div class="tiled-gallery-item tiled-gallery-item-large"><a href="https://9to5mac.vip.10uplabs.com/?attachment_id=412760"> <img style="width: 537px; height: 358px;" title="pad-side-table" src="http://9to5mac.vip.10uplabs.com/wp-content/uploads/sites/24/2018/04/pad-side-table.jpg?w=537&amp;h=358&amp;crop=1" alt="pad-side-table" width="537" height="358" /> </a></div>
</div>
<!-- close group -->
<div class="gallery-group images-1" style="width: 459px; height: 362px;">
<div class="tiled-gallery-item tiled-gallery-item-large"><a href="https://9to5mac.vip.10uplabs.com/?attachment_id=412761"> <img style="width: 455px; height: 358px;" title="pad-white-sidetable" src="http://9to5mac.vip.10uplabs.com/wp-content/uploads/sites/24/2018/04/pad-white-sidetable.jpg?w=455&amp;h=358&amp;crop=1" alt="pad-white-sidetable" width="455" height="358" /> </a></div>
</div>
<!-- close group -->

</div>
<!-- close row -->

</div>

screen shot 2018-04-05 at 15 40 04-fullpage

gregbarbosa avatar Apr 05 '18 19:04 gregbarbosa

Greg,

Thanks for opening this issue.

Shortcodes are typically expanded before distribution - the gallery shortcode won't work correctly on the destination site. I think the HTML you see when unlinking is expected, however it should still look the same on the front end. If you preview the post does it look right? I tried testing this locally with default WordPress themes and it seemed to work as expected.

adamsilverstein avatar Apr 10 '18 15:04 adamsilverstein

If you preview the post does it look right?

It does not. Images look resized and overlapping text and post content. (Adding image from @adamsilverstein's internal testing.)

e24cf039d158787ff0cefa78b05e9528 jpeg

gregbarbosa avatar Apr 12 '18 18:04 gregbarbosa