• Resolved barbutti47

    (@barbutti47)


    Hi,

    I started noticing since the release of version 0.3 of the WordPress Importer that the parser is ignoring the value set in the <wp:attachment_url> of the WXR XML when it tries to download file attachments.

    I was able to verify this by looking into the value of the $import_data variable inside the WP_Import::import_start method. Since the parser is ignoring the wp:attachment_url value, the importer uses the value of <guid> for the URL download — which most of the times (at least to me) isn’t correct.

    Anyone experiencing the same problem?

    Thanks.

Viewing 8 replies - 16 through 23 (of 23 total)
  • Yes I checked it and OK I’ll open a new thread.. Thanks..

    0.4 is released fixing the original problem described and also mmjaeger’s problem with attachments in the wrong location. Marking as resolved.

    Thread Starter barbutti47

    (@barbutti47)

    I’m sorry, Jon but this doesn’t seem to be fixed.
    After a few tests here, it seems to be downloading only one attachment file from the XML, no matter how many are declared in it. It’s not giving out any errors either, which I guess makes things even more confusing.

    Any ideas?

    That’s strange. Multiple attachments are fine for me.

    Are you only seeing one item in the Media admin section? Did the import complete properly, i.e. did you see the “All done. Have fun” message at the end?

    Could you provide me with an example export file to test? Email wp AT lionsgoroar.co.uk if possible.

    Thread Starter barbutti47

    (@barbutti47)

    Hey Jon,

    I was able to track down the problem, and it’s not exactly the importer’s fault. The file attachments on my XML had empty <wp:post_id></wp:post_id>s, and this is a problem with the new version of the importer (wasn’t before with the older versions).

    Line 526 of the importer has this code that’s causing the problem with my XML:

    if ( isset( $this->processed_posts[$post['post_id']] ) )

    Maybe the importer could check if the post_id isn’t empty before seeing if it’s been processed before?

    I understand this can bring problems, and that my XML should probably have the post ids all along. But who knows… =)

    Thank you for the help!

    Nice job tracking that down.

    I will include the fix for you in the next version — may not be a while for full release but you will have the fix locally — as it makes sense, even if it’s a very unusual problem. It will probably be in the development version tomorrow.

    Thank you for the help!

    No problem. Glad I was able to ??

    Version 0.4 in WordPress 3.1.

    The import of all tags failed !!

    Version 0.4 in WordPress 3.1.

    The import of all tags failed !!

    Firstly, could you please open a new thread. This is unrelated to this thread which is already long enough.

    On the new thread could you please give more details about the options you used when exporting. More details about how the tags have failed; are tags present in Posts > Post Tags? are tags just not attached to posts?

    An example export file would be most useful for debugging any problem. Email wp AT lionsgoroar.co.uk if you do not want to upload it publicly.

    Finally, I’m having no problems with tags myself ??

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘[Plugin: WordPress Importer] Importer ignores attachment_url from WXR’ is closed to new replies.