Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

SquareSpace importer creates broken image gallery #50745

Open jeroenpf opened 3 years ago

jeroenpf commented 3 years ago

Posts on SquareSpace that have an image gallery are not imported properly. The way we import image galleries needs to be investigated and fixed.

When importing content that has an image gallery, for each image two img tags get added. One of them is correct but the other one does not have a src attribute.

e.g.

<img src="http://example.files.wordpress.com/2019/07/example-image.jpg" alt="example-image.jpg">
<img class="thumb-image" alt="example-image.jpg">

Furthermore, some CSS originating from the export file is added as visible content after the post has been imported:

#block-yui_3_17_2_1_1613370968276_2267 .sqs-gallery-block-grid .sqs-gallery-design-grid { margin-right: -20px; }
#block-yui_3_17_2_1_1613370968276_2267 .sqs-gallery-block-grid .sqs-gallery-design-grid-slide .margin-wrapper { margin-right: 20px; margin-bottom: 20px; }

Steps to reproduce the behavior

  1. On squarespace.com, create a post or page and add an image gallery with a couple of images to it.
  2. On SquareSpace go to settings -> advanced -> import/export and export the content of your SP site.
  3. On WordPress.com use the SquareSpace importer to import the previously exported file
  4. View the post that contains the image gallery and see how it is broken.
kosiew commented 3 years ago

@vishnugopal ,

Tested export of https://rhino-octopus-tneh.squarespace.com/config/ to PdxAbp-8-p2

Reproduced issue:

image

The gallery was not imported at all. The images in the gallery were also not imported to Media.