WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Importer
Broken, images are not linked to post, not all post are importet (34 posts)

  1. leisegang
    Member
    Posted 2 years ago #

    The importer does not work for me.

    it does not link images to posts. so i get 600 posts with 3000 images that dont work.

    http://wordpress.org/extend/plugins/wordpress-importer/

  2. Removing the modlook tag.

    Please don't tag a regular support thread just to get a look; it's not even been an hour and give the forum volunteers a chance to help you.

    abusing this tag in the hopes of attracting the attention of a moderator to your question will not be viewed kindly.

  3. nimmolo
    Member
    Posted 1 year ago #

    I'm having this exact problem.

    Exporting all wp content from WP 3.3.2 and importing to WP 3.3.2 on the same server.

    wxr xml file is only 1.9MB, below the limit. No error messages.

    All posts pages and media come in - but without any of the attachment parent-child hierarchy from the original WP db.

    It's obviously a serious problem for a media-heavy site, it would be a week of work at least to reattach all the images to the posts.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    What happens if you try importing the data from the Theme Unit Test file into a fresh install on the same server? No extra themes and no plugins.

  5. nimmolo
    Member
    Posted 1 year ago #

    Esmi hi - before I do the fresh install and report on that I just want to note that I looked through about 50% of my exported wxr .xml file (the long way!) and the <wp:post_parent> attribute is not missing on any of the media files. So the export of attachment parents at least seems to be working properly.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I've imported the unit test data about a dozen times over the last couple of months, so I know that file works & that you can import all attachments. Speaking of which, you are checking the upload attachments box when carrying out the import, aren't you?.

  7. nimmolo
    Member
    Posted 1 year ago #

    Yes - I was checking the upload attachments box.

    Now, the theme unit test file is churning away but not uploading....

    To be precise it is an unused recent install, but not a fresh install. I don't have the authority to make a new install on that server - i don't have the hosting login/password.

    ** update: worked fine, see below **

  8. nimmolo
    Member
    Posted 1 year ago #

    Update: goshdarn safari.

    Firefox uploaded everything A-OK. Attachment dependencies OK.

    I'm now going to reset the database and try importing the offending wxr to this install.

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    Note that the WXR file does *not* contain the media files themselves, and that the server you're importing to downloads them from the web, using their original URLs.

    This means two things:
    1. If the exporting server no longer has the files, then the importing server won't be able to go get them.

    2. If you're exporting a site and importing it to another install on the same server, then the server may not be able to connect back to itself to retrieve the attachment files. This is known as "loopback" connections, and some servers have loopbacks disabled for security reasons.

  10. nimmolo
    Member
    Posted 1 year ago #

    Otto thanks. The prob with the previous import scenario though, was not that - the media files all imported OK via "loopback", and the orig files all exist right there in the same home folder of the hosting account. Loopback appears not to have been an issue.

    What got lost was their status in the DB as children, i.e. as attachments with a post parent ID! They're all there, orphaned.

    That's crazy, right? It appears that is the same thing that happened to the OP.

  11. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Just to clarify - were your previous problems specific to Safari?

  12. nimmolo
    Member
    Posted 1 year ago #

    Esmi thanks - no they weren't, that was just a complete fail on uploading the wxr via safari, I almost always am using firefox.

    In other words, for me: Uploading via safari that one time yesterday, i got nothing.

    Uploading "normally" via Firefox, i get all posts pages and media, without any error msgs, but lose all wp-post-parent data for image attachments.

  13. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Was that with the theme unit test data?

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    I can't reproduce this with a simple test. Single post with attachment, parent is fine. Import into fresh new install, attachment remains connected correctly.

  15. nimmolo
    Member
    Posted 1 year ago #

    Thanks Otto.

    Esme - Yes it was the theme unit test data first, then my WXR again.

    To recap: I uploaded the theme unit test data successfully, after ditching Safari.
    All posts and attachments OK.

    Then I reset my database to the freshly-installed state using the lovely WP Database Reset plugin, and attempted to upload my own originally-offending WXR file again.

    I have inspected this WXR file myself, and the wp-post-parent fields contain the correct data. That is to say that all media files seem to be correctly attached to their parent posts within the WXR file I am exporting.

    Now I'm getting a 404 error when trying to import this file. It's only 1.9MB.

    Would anyone else be willing to try the import with my WXR file?

  16. Edit: Doh! Must be color blind, I just saw the link. Trying now.

    Would anyone else be willing to try the import with my WXR file? happy to send it...

    It'll be a few hours from now (as I'm at work) but I'm game.

    Like many, I've got a Crash Test Dummy™ WordPress installation to play with. Can you put the WXR file somewhere where it can be retrieved?

    Or are your trying with this one which works for me:

    https://wpcom-themes.svn.automattic.com/demo/test-data.2011-01-17.xml

  17. nimmolo
    Member
    Posted 1 year ago #

    Thanks Jan.

    I edited the post to contain a link to my problematic WXR.

    I get a little trigger happy with the edit button sometimes. :)

  18. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I'm trying an import on a fresh install now and it's just hanging.

    [EDIT] The import finally timed out.

    Fatal error: Maximum execution time of 60 seconds exceeded in E:\data\data3\server\test2\wp-includes\class-http.php on line 1106

    I also got a list of duplicate attachments for the (presumably) partial import.:

    Media “WEB-3781.jpg” already exists.
    Media “WEB-4677.jpg” already exists.
    Media “WEB-5065.jpg” already exists.
    Media “WEB-0282.jpg” already exists.
    Media “WEB-0505.jpg” already exists.
    Media “WEB-090.jpg” already exists.
    Media “WEB-0802.jpg” already exists.
    Media “WEB-6011.jpg” already exists.
    Media “WEB-0475.jpg” already exists.
    Media “WEB-115.jpg” already exists.
    Media “WEB-0601.jpg” already exists.
    Media “WEB-0248.jpg” already exists.
    Media “WEB-0273.jpg” already exists.
    Media “WEB-0456.jpg” already exists.
    Media “WEB-00170.jpg” already exists.
    Media “WEB-0255.jpg” already exists.
    Media “WEB-4563.jpg” already exists.
    Media “WEB-0686.jpg” already exists.
    Media “WEB-0277.jpg” already exists.

  19. Edit: Some serious stereo parallel work going on here... ;)

    Me too. The JPEGs are importing as my upload directory is populating, but aside from that it's just spinning it's wheels.

    Actually, I just got a time out from my own server! Never saw that before.

    Does it matter that posts are protected meaning you have to log into them to view them...? Not a single post was imported.

    http://test2.kiteassist.org/?p=5 or http://test2.kiteassist.org/2012/01/j-foil-update/ is requiring a login to view.

    On the test2 server disable all of the plugins first and see if that works.

  20. The posts were a no go but I did import 1,129 images and media.

  21. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I managed no posts and 67 attachments.

  22. nimmolo
    Member
    Posted 1 year ago #

    OK - that is some insight into the issue.

    Super-doh! I didn't notice that my first failed import had imported a lot of media, just no posts or pages. At that first test site I imported to, I've got 67 images like Esmi, and no posts.

    I tried it on a new fresh WP install on a different server, and got no posts, no pages, and 468 images.

    Jan are you saying I should disable all plugins on test2 during the import process?

    I'm disabling them now. Pw protect was a client request since this dev site is under wraps, but i will disable all that stuff and all plugins now.

    Thanks you guys for the help.

  23. Jan are you saying I should disable all plugins on test2 during the import process?

    It's a "just in case" measure. Try disabling all plugins and then create a new WXR file and try to import that.

    Change the name of your uploads directory or your media won't import properly and see if that makes it better.

  24. nimmolo
    Member
    Posted 1 year ago #

    Just to confirm - I've disabled the plugins, and i've now exported a new WXR file.

    whew! my site currently has 17 active plugins (well, until 5 minutes ago) out of 3 times that many inactive, because i'm still testing the site. I had to write down the list of ones I'm using, I cannot possibly remember that much :) maybe it's a ridiculous amount but the functionality they provide is necessary. what do you think?

    also Jan I don't understand what you mean by

    Change the name of your uploads directory or your media won't import properly and see if that makes it better.

    Did you mean to say "change the name of your uploads directory or your media won't upload properly"? or "...if your media..."

    Also of note: there are only 647 media files in the original site (test2). Jan it looks like your original upload got everything twice.

  25. When you try to re-import the WXR file, the media gets downloaded again. If the file exists then you get an error message such as what Esmi got.

    Media “WEB-0277.jpg” already exists.

    On the target WordPress installation and not the original server, rename wp-contents/uploads to wp-contents/uploads-old and you avoid those messages.

  26. nimmolo
    Member
    Posted 1 year ago #

    ah - got it.

    I'm actually doing a full database reset between uploads, so the upload folder is empty.

    Should I not do that? Sometime in the past I seem to remember a wxr file successfully uploading after multiple partial fails...

    Edit I'm going to try a re-upload of the failed wxr now, without database reset

  27. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If the file exists then you get an error message such as what Esmi got.

    But I only carried out a single import on a fresh db. I didn't re-run it which is why I originally thought the duplicate image warnings were strange. Then I just grepped the original .xml file and, sure enough, there are duplicate references to a single image - such as WEB-3781.jpg - with different post parents (post ids 3229 & 3501 in this case).

  28. nimmolo
    Member
    Posted 1 year ago #

    That makes sense esmi, as there are many images with more than one post-parent. In the future, if I can ever get the galleries set up, there will be way more.

    Is this a problem? Doesn't seem like it.

  29. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    as there are many images with more than one post-parent

    So, you manually created new attachment posts in the database? Because there's no way to actually do this from within WordPress.

    This generally isn't a good idea. If you delete one of those attachments, then the files will be deleted as well, even though the other attachment remains. WordPress doesn't support multiple parenting of attachments at present.

  30. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I think it might be because, digging even further, both attachments reference the same image file:

    <guid isPermaLink="false">http://test2.kiteassist.org/wp-content/uploads/2010/06/MMBG2H1291FC980C0.jpg</guid>
    <guid isPermaLink="false">http://test2.kiteassist.org/wp-content/uploads/2010/06/MMBG2H1291FC980C0.jpg</guid>

    Now, as I understand it, that just shouldn't happen. One image attachment cannot have 2 parents. If you upload the same image again, WP should add something like 1 onto the base filename to avoid this kind of occurrence - which I've just confirmed on one of my installs. Since it seems that something in the attachments part of the import (which is nearer the top of the .xml file) is borking and causing the import to hang, I have to wonder whether this has something to do with it.

    Time to get some more eyes on this, I think...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic