bobbingwide / oik-clone

Clone content between sites
https://www.oik-plugins.com/oik-plugins/oik-clone-clone-your-wordpress-content/
GNU General Public License v2.0
5 stars 0 forks source link

Scaled image file given suffix on cloning #59

Open bobbingwide opened 3 years ago

bobbingwide commented 3 years ago

When I cloned https://blocks.wp.a2z/block_example/cover-block-with-parallax/ to https://blocks.wp-a2z.org/block_example/cover-block-with-parallax/ the background image was not displayed on the target.

The background image in the source was WordPress-paper-chain-scaled.jpg

<!-- wp:cover {"url":"https://blocks.wp.a2z/wp-content/uploads/sites/10/2020/11/WordPress-paper-chain-scaled.jpg","id":6938,"hasParallax":true,"overlayColor":"luminous-vivid-orange"} -->
<div class="wp-block-cover has-luminous-vivid-orange-background-color has-background-dim has-parallax" style="background-image:url(https://blocks.wp.a2z/wp-content/uploads/sites/10/2020/11/WordPress-paper-chain-scaled.jpg)"><div class="wp-block-cover__inner-container">

When this attachment was cloned on 24 Nov 2020 the target file became `WordPress-paper-chain-scaled-1.jpg

During the clone there was no change to the filename so on the target site the background image was missing.

Workaround

I renamed the target file in the server.

Attempt at a better workaround

bobbingwide commented 3 years ago

Try cloning it again and see if a suffix is added.

Yes, it was; a -1 again. Why?

bobbingwide commented 3 years ago

Second attempt at a better workaround