awesomemotive / one-click-demo-import

One Click Demo Import plugin
https://www.awesomemotive.com/
195 stars 83 forks source link

Different behaviour when importing images using OCDI and WordPress importer #180

Closed marceloquinze closed 4 years ago

marceloquinze commented 5 years ago

Hi! I noticed that when I'm importing posts that contain images there's a different behaviour depending on which tool I use.

When I import content using OCDI, the URL of images that are inside the post content doesn't change. So, for example, I have this inside the XML file:

<!-- wp:image {"id":2013} -->
<figure class="wp-block-image"><img src="https://www.inbrackets.dev/parea-theme/wp-content/uploads/2017/09/StockSnap_6JEHS8PBHP-1024x683.jpg" alt="" class="wp-image-2013"/></figure>
<!-- /wp:image -->

When I import this XML file using OCDI, the URL doesn't change at all. However, when I import the very same file using only the WordPress Importer tool, the result is different.

Let's suppose I import the file on a localhost. When I open the post for editing (in Gutenberg, for example), I can see the image URL does change.

Using the WordPress importer: https://ibb.co/74r7R9z Using OCDI: https://ibb.co/kSG9YvT

Why the difference? Thank you for the amazing plugin!

P.S.: that happens only with post/pages content. Attachment URLs do change.

capuderg commented 4 years ago

Hi @marceloquinze,

sorry for the late replay.

If this is still relevant to you, please read my reply in this GH issue that should resolve your problem: https://github.com/awesomemotive/one-click-demo-import/issues/45#issuecomment-238144970

Take care!