WordPress.org

Forums

[resolved] Invalid author importing single WordPress to Mulitsite WordPress (43 posts)

  1. jessedijkstra
    Member
    Posted 4 years ago #

    When importing a single wordpress installation to a multisite wordpress installation with the WordPress Importer it does not map the right author.

    Is there anything I should do besides trying to map/import the author's to import the blog into a multisite wordpress environment?

  2. Is the author a member of the site you're trying to import into, AND are they an author there?

    Did you try to assign the author upon import, or did you tell it to create a new one?

  3. make sure the user exists in the network first, and is added to the subsite.

    THEN import.

  4. jessedijkstra
    Member
    Posted 4 years ago #

    I've tried the following two options:
    - Import the author
    - Creating the author beforehand, assigning it to the site then assigning it to the appropiate author.

    Both default to my current user.

  5. Both default to my current user.

    When you do the import, doesn't it ask you what account you want to map the posts to?

  6. jessedijkstra
    Member
    Posted 4 years ago #

    It does, if I map it to an user it defaults back to my current user anysways.

  7. Okay, THAT is weird. I'm going to try and reproduce this.

    What version of singlesite?

  8. jessedijkstra
    Member
    Posted 4 years ago #

    Those were my thoughts as well ;) At first I thought it had to do with the import plugin not being compatible with a MU WordPress database setup, but after looking at the source I was sure that couldn't be it.

    I upgraded the single site to 3.1.1 before doing an export to ensure that I have a compatible export file.

  9. Out of curiosity, why not flip the single site to MultiSite?

    It's POSSIBLE it could be an issue with the exported data. There might be a weird character in there causing the whacky.

    Is the user you're trying to add posts for an AUTHOR on the site?

  10. jessedijkstra
    Member
    Posted 4 years ago #

    Does the type of user matter for importing a user? I thought it was nothing more then an ID reference to the user.

    And the reason we're not flipping a single site to multisite: we're trying to setup a single environment hosted CMS solution with CDN for several clients (they're running single wordpress installations atm) to reduce maintenance cost. So after our first setup we will need to do this with more websites ;)

  11. Does the type of user matter for importing a user?

    It does. If you're not an author, you can't have a post assigned to be written by you. (I have a site with 600 users and 3 authors. Only the AUTHORS show in the dropdown menu for 'author' when I edit the post.)

  12. jessedijkstra
    Member
    Posted 4 years ago #

    I added them as Administrators for the record btw ;) Was just curious how exactly the WordPress Importer plugin worked. Thought it was basically setting the post author based on an ID not based on roles etc.

  13. jessedijkstra
    Member
    Posted 4 years ago #

    In the end I migrated the blog by hand with mySQL. Had problems importing the media with the importer as well (PHP didn't like the amount of imports and downloads). Took a bit of rewriting SQL queries but the effect is much better then that of the importer.

  14. At first I thought it had to do with the import plugin not being compatible with a MU WordPress database setup, but after looking at the source I was sure that couldn't be it.

    nitpicky: it;s not mu anymore. ;) And any internal basic functions for a single site work the same in multi. Really.

    but hey, you got it.

  15. adaptistration
    Member
    Posted 4 years ago #

    I'm having this same problem too. Went from a single install to a multi site install. Created the authors in network first, then added to child site, thought I made sure the user roles were the same (and even tried configurations after unsuccessful attempts) but the importer keeps assigning them to the admin.

    this is very, very frustrating and I hope there will be a way to get it straightened out while still using the standard importer becasue I don't think I can move the database as I had to delete the single install (which was using the sameparent.com/childname url as the new multi site URL) in order to assign the child site name to the new multi site. And I don't know if WP deletes the database when deleting the account.

  16. If you deleted the web account, then the db would be deleted by your host. If you just deleted the WP files, that does nothing to the db.

    Either way,, it;s always a good idea to take backups of the dbs & files before doing anything. As stated in the instructions. ;)

    If there's a bug in the importer, then it's trac ticket time.

  17. adaptistration
    Member
    Posted 4 years ago #

    Many thanks Andrea, the database is indeed gone. I should have known better but I'm still stuck with this inability to properly assign posts to their authors. suggestions?

    Update: something else to add to this is the image files aren't getting assigned to their respective posts either. The site in question I'm working with is at http://www.insidethearts.com/scanningthedial.

  18. adaptistration
    Member
    Posted 4 years ago #

    Another FYI, so as not to be confusing to current readers, I manually assigned the authors for the first index page of articles.

  19. Then this part is gonna suck.

    Now you actually do have to go into the db,find what the ID is of each author and manually reassigning each of their posts to the right author.

    Been there, it sucks. it's grunt work but doable.

    You might be able to find a plugin to help, but I did a quick search in the repo and didn't find anything quite suitable.

    Are the authors you added actually added as users to the main site? Cuz by default in a network, they aren't assigned anywhere.

  20. adaptistration
    Member
    Posted 4 years ago #

    Well if I have to get some bad news at least it's coming from you. :)

    I did create the authors in the network and manually assigned them to their respective blog so that part is all done. Are you thinking of a shortcut where that step might help?

    Overall, I've been pleased with WP multisite but it's things like this that make me want to toss it out a window. I have no idea why there isn't a tool or something to help with this as I'm clearly not the only one to encounter this problem with the import/export. As of now, I'm not even going to think about moving over the other multi author blogs, which sucks double because the whole point of going to the trouble to install and learn how to use multisite is to reduce the maintenance work.

    Thanks in advance if you have any other ideas.

  21. Well the importer may be having issues too. I haven't had a chance to test it thoroughly. Remember, they ripped it out of core in 3.1 so it's now a plugin.

  22. adaptistration
    Member
    Posted 4 years ago #

    I do recall when that switch was made and followed the initial discussion but never kept up with it. Does anyone know if these sorts of problems are more widespread since that decision and the advent of incorporating multisite into the standard WP version?

  23. Jon Cave
    WordPress Dev
    Posted 4 years ago #

    I cannot reproduce this issue. Here are the steps I took:

    1. Export 'All Content' from single site
    2. Created a new site on test network
    3. Imported the export file letting it create new users (except for one)

    This all worked as expected with my one of my users being mapped and the other four were created and had the appropriate posts/pages assigned to them.

    4. Deleted all posts and pages from the import site
    5. Re-imported but this time mapping to the users now existing on the site

    Again this worked as expected. Let me know if you think I did anything differently. I will also try a couple of other setups when I have some more time later on.

    Just to clarify the behaviour you are seeing: all users imported, all posts/pages imported *but* all posts are marked as authored by the current, importing user?

    Also it might really help me to reproduce if you could send me a copy of the export file if possible. Email wp AT lionsgoroar.co.uk if possible.

    [PS. minor note, the importers were pulled out of core in 3.0]

  24. adaptistration
    Member
    Posted 4 years ago #

    @Jon:

    It sounds like you're catching just about everything. Here are a few other points that many have impact on the outcome:

    1. Besides the author issue, it seems as though the image file names are imported but not the actual image.
    2. I've tried creating the users in advance of the import and letting the import tool create, but both variations produce the same result.
    3. To verify, all posts/pages are being attributed to "admin."
    4. I'm sending the export file now.

      Thanks,
      Drew

  25. Jon Cave
    WordPress Dev
    Posted 4 years ago #

    This problem should be resolved by the development version of the importer which will be released properly to coincide with WordPress 3.2. The development version is available from the Other Versions section here and here is a direct link to the zip.

    For those interested the root of the problem was extra restrictions on user login names in place in WordPress Multisite, specifically enforcing lower case user names. See http://core.trac.wordpress.org/ticket/17904.

  26. Nice find Jon. :)

  27. adaptistration
    Member
    Posted 4 years ago #

    Nice find indeed, many thanks!

    Do you think I am good to download and use the importer if I'm not running a dev version of 3.2?

    I've encountered the no upper case issue on another site within this same network; a jobs board that processes new posts via creating a user account: http://www.adaptistration.com/jobs. I had to do a work around by adding some text to the account creation page telling users to only use lower case.

    Drew

  28. Jon Cave
    WordPress Dev
    Posted 4 years ago #

    Do you think I am good to download and use the importer if I'm not running a dev version of 3.2?

    Yes. The development version of the importer should be good to go on WP 3.0+. Be sure to let me know of anything to contradict that!

  29. adaptistration
    Member
    Posted 4 years ago #

    Great, I'll upload that version and give it a shot today.

  30. adaptistration
    Member
    Posted 4 years ago #

    Update: mostly success!

    After using the 0.4 version of the importer, the system did assign the authors correctly (and thankfully). The only thing that didn't seem to work is assigning media to its respective post.

    Likewise, I think the importer failed to import the actual media. Although I have an entry for it, if I try to access the URL directly, I get the following error mesg:

    The image “http://www.insidethearts.com/scanningthedial/files/2010/10/[filename].jpg” cannot be displayed because it contains errors.

    So that's 70/100 and the biggest issue of author assignment is taken care of. Any suggestions on the media?

    Drew

Topic Closed

This topic has been closed to new replies.

About this Topic