Skip to content

Import From Ning now imports Ning content into BuddyPress

Back when Ning announced that it’d be cutting off previously free accounts, I took a weekend and developed Import From Ning, a plugin that helped users pull their Ning user and profile data into a WordPress or BuddyPress installation. It was my own little BuddyPress-fanboyish way of helping all those Ningsters.

Several weeks ago, Ning released its Ning Network Archiver, which (finally) allowed network admins an easy way to take their content with them. On the heels of this release by Ning, today I am releasing version 2.0 of Import From Ning, which imports the content from a Ning Network Archive.

Read more about the updated plugin here. And to those Ningsters who are coming over to WordPress and BuddyPress: good on ya!

Related posts:

  1. More Import from Ning goodness – ( Ning to BuddyPress / WordPress )
  2. New BuddyPress plugin: BP Import Blog Activity
  3. Importing Ning users into WP
  4. New WordPress plugin: Simple Import Users
  5. Facebook and content

66 Comments

  1. Thank you so much Boone! Many niche social networks will be saved because of your generous work! I look forward totesting this soon.

    Posted on 23-Jul-10 at 9:33 am | Permalink
  2. You’re my hero for pulling these together.

    Question: I used the original importer and pulled my members info in. With this update, it’s saying it can’t find the members file in the json folder. I re-added it there, but is it going to duplicate all the profiles I already created?

    Posted on 26-Jul-10 at 2:42 am | Permalink
  3. Hi Chris,

    It won’t overwrite the existing users, as long as the email addresses are the same. I am 90% sure that it will be smart enough to match the existing accounts with the accounts from the data set and import the content correctly. You might consider a DB backup before trying it, though I don’t think you’ll need it.

    Posted on 26-Jul-10 at 4:04 am | Permalink
  4. Mike

    Question: Can i use the plug-in on Buddypress with the version 1.0.3? Thanks very much!

    Posted on 27-Jul-10 at 1:00 pm | Permalink
  5. Curbob

    I tried to run the import tonight and received this error for every member on the first step import members:

    Warning: mkdir() [function.mkdir]: No such file or directory in /home/curbob/public_html/usaoffroading/wp-content/plugins/import-from-ning/bp-functions.php on line 210

    but it imported everyone, just not their avatars.

    Then if I continue on I receive this error for import of Discussion groups:

    Fatal error: Call to undefined function bb_new_forum() in /home/curbob/public_html/usaoffroading/wp-content/plugins/buddypress/bp-forums.php on line 128

    from there I can not continue any further.

    wordpress 3.0.1 with no other plugins except buddy press and import from ning

    Posted on 03-Aug-10 at 9:50 pm | Permalink
  6. TomC

    First of all Boone, thank you so much to create this plugin. I’m sure it’ll help out many Ning Communities. If it works out great, i’ll make sure that we make a donation.
    As for now, I seem to have the same problem as Curbob above. I get the aforementioned warning (… on line 210) but then broke after user 76 (of the 700) with this message: “Fatal error: Cannot break/continue 1 level in /Applications/XAMPP/xamppfiles/htdocs/archief20/wp-content/plugins/import-from-ning/bp-functions.php on line 196″ and no possibility to continue. As with Curbob the 76 users were imported, but without their avatars.
    I’m using WP3.01, BP1.2.5.2 and 2.02 of your importer.
    Thank you very much in advance!

    Posted on 04-Aug-10 at 3:58 am | Permalink
  7. Curbub – if avatars did not import, it probably means that either the wp-content/uploads folder doesn’t exist, or that it doesn’t have the correct permissions. Set the permissions to 777 just for the upload process and try again. As for the bb_new_forum() thing: you have to enable forums at Dashboard > BuddyPress > Forum Setup before you can import discussions. The documentation should be clearer on this – I’ll fix it in the next version.

    TomC – That looks like a different error, one that I haven’t seen before. Did you simply try hitting refresh?

    Posted on 04-Aug-10 at 6:11 am | Permalink
  8. TomC

    Boone, thx for your attendion. Yep, I did refresh. It entered one more and then again the whole fatal error bunch “… on line 196″. I also noticed others with the same error here (http://teleogistic.net/code/wordpresswordpress-mu/import-from-ning/#comment-12785) and here (http://teleogistic.net/2010/04/importing-ning-users-into-wp/#comment-12931).
    Considering your answer to Curbob who has with the “… on line 210″ error the same initial problem as me. In my case the /uploads folder exists and has 777 permissions. Every avatar is in fact imported there!
    FYI, to avoid any accidental mailing to users I’m running it in a XAMPP-environment. But I guess that might not be a problem.
    Thank you again.

    Posted on 04-Aug-10 at 6:32 am | Permalink
  9. a lot of trouble with this importer.

    using v2 and json files, not all users were imported, or any profile data. photos etc …nothing.

    i tried making the same user fields in wp/bp in case they had to be there for data import but that made no difference either.
    so now im settling for importing just user and email which seems to work with version 1 and csv file.

    there appears to be a lack of support details on how to setup wp/bp so that the import is successful – just like the last post about enabling forums beforehand.

    i also had the ‘Warning: mkdir() [function.mkdir]:…’ errors.

    Posted on 04-Aug-10 at 6:57 am | Permalink
  10. andy – Sorry you had troubles, but it’s a rough importer that I built in my spare time. Perhaps unreasonably, I spent much more time getting it to work than I did writing up support documentation.

    When you say “not all users were imported”, do you mean that the importer just stopped in the middle? Did you get an error message? Did the importer complete, but miss a bunch of your users?

    Posted on 04-Aug-10 at 8:08 am | Permalink
  11. TomC – OK, I’m seeing a possible fix for at least the 196 problem. Can you change continue; on line 196 to return;? I forgot to change this when I rearranged the plugin a bit.

    Posted on 04-Aug-10 at 10:49 am | Permalink
  12. TomC

    Boon, thx for your time and advice. I’ll test it when I’m back at the office. Tomorrow that is! PS: you can delete my double comment if you wish!

    Posted on 04-Aug-10 at 1:43 pm | Permalink
  13. If we forgot to give wp-content/uploads 777 permissions, can we just re-run the import to add the images (avatars, and post images)? Or do we have to find a way to delete all of the previously imported content, and then start the import over?

    P.S. You might want to add the wp-content/uploads 777 info to your FAQ. Its something we should all know to do, but forget quite often.

    Posted on 04-Aug-10 at 5:26 pm | Permalink
  14. Curbob

    The wp-content/uploads 777 permissions worked, but when importing Profile fields I receive the error:

    Warning: Missing argument 3 for xprofile_set_field_data(), called in /home/curbob/public_html/usaoffroading/wp-content/plugins/import-from-ning/bp-functions.php on line 442 and defined in /home/curbob/public_html/usaoffroading/wp-content/plugins/buddypress/bp-xprofile.php on line 707

    groups were created correctly

    group discussions created correctly

    Discussions import correctly

    Looks like everything else worked correctly.

    Posted on 04-Aug-10 at 8:59 pm | Permalink
  15. TomC

    First of all, Boone, I hope we’re helping you with our comments, instead of being a huge pain in the ass.

    Here are my latest experiences:
    * When importing users:
    - The fix for the 196-problem helped! So I could continue.
    - the aforementioned 210-problem when importing users remained. The avatars are being put in the 777′nd uploads-folder, but not linked with their corresponding users.
    - all users imported tough!

    * When importing profile fields:
    - I refer to the error in Curbob’s latest message. Tough, everything seems to be imported (profile fields and profile messages > mentions).
    - After some refreshing I was able to continue (counts for any of the following steps, so won’t repeat ;-)).

    * When creating groups:
    - I got the following error for each created groups: Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/archief20/wp-content/plugins/import-from-ning/bp-functions.php on line 582
    - all groups seemed to be created (just not the avatars – that are neither copied to the uploads-folder – or shoud that be somewhere else?)

    * When importing discussions:
    - before each time the refresh message appeared, I got 9 equal errors (guess for each discussion imported?): Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /Applications/XAMPP/xamppfiles/htdocs/archief20/wp-includes/wp-db.php on line 1582
    - again, anything textual seems to be imported well, but no images were copied to the uploads-folde and thus not linked.

    * When importing blogposts and pages
    - as far as blogpost are concerned it worked like a charm
    - only got an error at the end: Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/archief20/wp-content/plugins/import-from-ning/bp-functions.php on line 934
    - like above, all things textual are imported, but nothing of the imagery.
    - also got an error that ning-pages-local.json couldn’t be found, but that was an error in our back-up.

    To conclude, after patient refreshing and ignoring errors, all textual data seems to be imported, but none of the images (only avatars of members, but those don’t get linked).

    Thank you very much for your patience when reading this post and eventually solving the problems.

    Posted on 05-Aug-10 at 4:53 am | Permalink
  16. Thanks for the feedback, everyone.

    Several of the bugs that have been listed here are the result of my own sloppy coding. I’ve added data-type checks at each of the places mentioned above to make sure that you don’t get that kind of error anymore. (I hope.) Version 2.0.3 has just been checked in.

    Posted on 05-Aug-10 at 10:55 am | Permalink
  17. TomC

    Always happy to give feedback, certainly with a plugin that can be very useful. I’m looking forward to give it another run when I’back at the office.
    Note aside: looking forward to future developments esp. the integration with BB Album/Media (and the dev of that plugin itself).

    Posted on 05-Aug-10 at 11:52 am | Permalink
  18. TomC

    Version 2.0.3 worked well! Even the user avatars got imported nicely. Just a pity that pictures in discussions and blogposts didn’t import. But as you said: “The plugin attempts to recognize inline images and copy them to the BuddyPress installation…”. You’ve made a very good start so far!

    Posted on 06-Aug-10 at 4:42 am | Permalink
  19. Glad some of the problems were fixed, TomC! Peculiar that none of the images were copied…but I will have a look.

    Posted on 06-Aug-10 at 6:14 am | Permalink
  20. TomC

    Rome wasn’t build in a day, so why should this plugin do better ;-)! But we’re getting there. It was already nice to see that most of the data (noticed some lack of data but I’m quite sure that’s a problem with the current back-up) got imported.
    Did I already mention you’re doing a great job!

    Posted on 06-Aug-10 at 6:21 am | Permalink
  21. yousef n

    my ning site thrive on images, but untill now i cant see any importer for ning videos and photos to buddy press album or any other plugin attachments to allow that, why ?

    Posted on 07-Aug-10 at 2:04 pm | Permalink
  22. yousef – Because I haven’t built it. I hope to do so in the future when I get some free time.

    Posted on 07-Aug-10 at 2:32 pm | Permalink
  23. yousef n

    Thanks for the reply Boone, ning will start the new plan on august 20, do you think anything could be done for that before then ? thanks

    Posted on 07-Aug-10 at 2:51 pm | Permalink
  24. It’s unlikely that I’ll have time to complete such a feature by then. I have too much paid work to do between now and then. Sorry. Plus, the updated version of BP Media is not yet finalized, and as far as I know will not be for another few weeks.

    Posted on 07-Aug-10 at 4:27 pm | Permalink
  25. Hey Boone:

    I think upgrading to the new version of the plugin wipes the content form the JSON folder. Just wanted to make you aware of that. Now, I have to reupload all the content — all 2.7GB’s.

    Tony

    Posted on 08-Aug-10 at 3:28 pm | Permalink
  26. Wait…I may have spoken too soon. Will get back to you on that last comment.

    Posted on 08-Aug-10 at 3:31 pm | Permalink
  27. Actually, Tony, you’re probably right. The WP auto-upgrade probably just overwrites the directory.

    I tweaked the directory information in verion 2.0.4, so that you store your json files in wp-content/ning-files (a directory you’ll have to create) rather than in the plugin directory itself. That way they won’t get overwritten with future upgrades.

    Posted on 08-Aug-10 at 4:41 pm | Permalink
  28. Ah…I should have come back to this post…I’m on another thread entirely, LOL.

    Okay…duly noted. Sorry for the freak out on the other post…I didn’t see this first!

    Thanks for pushing that fix.

    Posted on 08-Aug-10 at 7:10 pm | Permalink
  29. Hey Boone:

    Not sure if you could have made a minor error on the path to the Discussions JSON.

    Everything is working fine, but now we’re getting this and it runs on all the way down to the Continue button.

    No forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id – skippingNo forum id -

    Posted on 08-Aug-10 at 8:04 pm | Permalink
  30. On click continue, we’re getting this:

    Warning: file_get_contents(/nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/ning-files/ning-blogs-local.json) [function.file-get-contents]: failed to open stream: No such file or directory in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/plugins/import-from-ning/bp-functions.php on line 92

    Warning: Invalid argument supplied for foreach() in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/plugins/import-from-ning/bp-functions.php on line 870

    Warning: file_get_contents(/nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/ning-files/ning-pages-local.json) [function.file-get-contents]: failed to open stream: No such file or directory in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/plugins/import-from-ning/bp-functions.php on line 92

    Posted on 08-Aug-10 at 8:05 pm | Permalink
  31. Okay…I reinstalled the Forums. The skipping error has gone away. Now we get this:

    Warning: file_get_contents(/nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/ning-files/ning-discussions-local.json) [function.file-get-contents]: failed to open stream: No such file or directory in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/plugins/import-from-ning/bp-functions.php on line 92

    Warning: Invalid argument supplied for foreach() in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/plugins/import-from-ning/bp-functions.php on line 616

    Posted on 08-Aug-10 at 8:09 pm | Permalink
  32. We went back to the 14 MB file and are getting the skipping error again. Since we’d already imported some content…we’re wondering why we are getting the skipping error. We also reinstalled BBPress from the admin. Not sure if that cause a value to go missing.

    Posted on 08-Aug-10 at 8:43 pm | Permalink
  33. Tony, I just put some changes in the development trunk version that should address a few of your errors. Can you download http://downloads.wordpress.org/plugin/import-from-ning.zip, replace your existing import-from-ning directory with the contents of the zip, and try again? Thanks.

    Posted on 09-Aug-10 at 9:41 am | Permalink
  34. Anthony Zeoli

    Hey Boone…thanks.

    Tried that, still getting the skipping error.

    Let me know if you want me to send you the WP login and FTP and you can mess around with it. It’s a test environment, so I’m okay with that.

    Tony

    Posted on 09-Aug-10 at 10:06 am | Permalink
  35. Tony – if you want to send your login stuff to my email (twitter handle at gmail) then I’ll see if I can find a chance to look around. Off the top of my head, though, the “skipping” message occurs when the forum topic in question is unassociated with a category or a group, so there may not be much I can do (unless it’s a bug in my code, which is possible).

    Posted on 09-Aug-10 at 1:05 pm | Permalink
  36. Anthony Zeoli

    Okay, before I do that then, would it make sense to dump all Forum posts from the table in mysql and try to re-import.

    You see, we actually did get some in before, but when you updated to 2.0.3, I reinstalled BBPress from the admin. I’m thinking that between the time I reinstalled BBPress then ran 2.0.3, something screwed up.

    I’ll try and dump the Forums content from the db and see if that works. If that doesn’t work, then I’ll need your help and will send over the credentials.

    Tony

    Posted on 09-Aug-10 at 2:12 pm | Permalink
  37. Anthony Zeoli

    We dumped the data from wp_bb_forums and attempted to restart the service, but are still getting the skipping error. What other tables does the plug-in check for Forum ID?

    Honestly, I think it’s a bug, because remember, it worked for us before you upgraded to 2.0.3 then 2.0.4.

    I’ll send you the credentials by your email.

    Posted on 09-Aug-10 at 5:41 pm | Permalink
  38. Hey Boone:

    I reuploaded the entire 15 MB JSON file and ran the importer again. Now, I don’t get the skipping error, but I do get this:

    Warning: Invalid argument supplied for foreach() in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-content/plugins/import-from-ning/bp-functions.php on line 619

    I looked at line 619 and this is where it’s hanging up. Any suggestions?

    This is line 619….

    foreach ( $discussions as $discussion_key => $discussion ) {
    if ( !isset( $discussion->category ) )
    continue;

    Any ideas on how to solve this?

    Posted on 11-Aug-10 at 9:01 pm | Permalink
  39. Hey Boone…I know you must be busy, but if you could send a quick reply, I’d appreciate it. Thanks.

    Posted on 13-Aug-10 at 8:25 pm | Permalink
  40. Anthony Zeoli

    Boone “when you say “forum topic is not associated with a category or group”, do you mean that they don’t have category’s or groups assigned to them on Ning, so they’re not coming over correctly?

    Posted on 16-Aug-10 at 3:20 pm | Permalink
  41. The error means that the plugin can’t find a forum id for the discussion. That can be caused by several problems:
    1) In the JSON file, no category or group is specified for that particular discussion item. When that happens, the plugin doesn’t know what to do with the item.
    2) A category/group is specified in the JSON file, but the corresponding BP group was not properly created.
    3) The group was created properly, but was not recorded by the plugin in the array that associates Ning group ids with BP group ids.
    4) The Ning/BP group associations have gone correctly, but no forum was created for that group (or the forum id was lost).

    Of those, I would say that the order of probability is: 1, 2, 4, 3, where 1 is the most likely.

    I’ll have a look as soon as I can to try to identify the issue.

    Posted on 16-Aug-10 at 5:09 pm | Permalink
  42. Is it possible to import discussions as blog posts?

    When I look at the JSON feed it seems to be the same markup. Exactly the same.

    If I merge the files and respect the “}])” I should be ok, no?

    I’d like to keep the data “inside” the bounds of the normal WP install moving forward.

    Any other advice in that direction?

    Posted on 17-Aug-10 at 1:23 am | Permalink
  43. Interesting idea, Alex.

    The markup for the discussion and blog JSONs is exactly the same insofar as they are both in the JSON format. The metadata is a bit different for the two content types, but maybe not enough to make a big difference.

    I just did a quick test and was able to make it work. You’ll need to merge the discussion data file into the blogs data file, and make a small modification to the plugin file.
    1) Merge the files. In ning-discussions-local.json, remove ([ from the beginning of the file and ]) from the end. Select the entire content of the file and copy. Then, open up ning-blogs-local.json. Scroll to the end of the file, and insert a comma right before the final ]); paste the contents of the discussion file right after this comma. Save the file.
    2) Modify import-from-ning/bp-functions.php. There’s a line around 877 or so that says $post_status = ( $blog->publishStatus == 'publish' ) ? 'publish' : 'draft';. Change it to $post_status = 'publish'. Save the file.
    3) Before running the importer, you might consider replacing your ning-discussions-local.json file with an empty one by the same name, so that you don’t import discussions both as discussions and as blogs.
    4) Run the importer.

    You’ll still need BuddyPress in order to run the import, but the blog and user content will be BP-independent thereafter.

    Posted on 17-Aug-10 at 6:35 am | Permalink
  44. Rob

    Hi –
    I have run the AIR exporter and collected the output.
    I have then uploaded it to the wp-content/ning-files folder as specified.

    There is a “Houston we have a problem” error and the files won’t be picked up…
    BUT: If i rename the folder to ning-file (not files) there is an exception thrown at the top of the plugin page.

    Any guidance?

    Thanks
    Rob

    Posted on 23-Aug-10 at 8:29 pm | Permalink
  45. I had this issue. When I had this issue there was an error in the data in my members file. As I recommend above, try downloading the files again, and specifically the members files, and the overwrite the copies on your server.

    If you feel like it you can also hand-parse the file to find the error.

    Posted on 24-Aug-10 at 3:39 am | Permalink
  46. Geert-Jan

    Hi Boone,

    Trying the import, but consistently get the following:

    PHP Warning: Invalid argument supplied for foreach() in ../wordpress/wp-content/plugins/import-from-ning/bp-functions.php on line 616 (or other line).

    Then some json files it can’t find which seems ok as the are not there from the Ning export. Seems to find the ones that are available.

    Then fatal:

    PHP Fatal error: Call to undefined function bp_ning_import_members_markup() in ../wordpress/wp-content/plugins/import-from-ning/bp-functions.php on line 42.

    Puzzled as this function is available in bp-functions… This fatal error happens on other functions as well in the bp-functions file (depending on what I try to import). Looks like it can’t parse the php file properly or something like that… Have to say I’m not super familiar with php btw.

    Obviously nothing is imported and get a blank screen.

    Tried a completely fresh install of wordpress/buddypress, latests versions as of today but same result. I’m on solaris if that might matter. Tried all kind of permissions and ownership on various files but error is consistent.

    Any clues what can be going on? WordPress, buddypress and other plugins are working fine in my install.

    Thanks.

    Posted on 25-Aug-10 at 11:40 pm | Permalink
  47. Geert-Jan – That is indeed puzzling, especially since the plugin is obviously able to run other functions within that plugin file before getting to that point in the process. (Several functions are called when the first page of the import process is loaded.)

    It’s *possible*, though I think unlikely, that is has to do with running Solaris. What version of PHP are you running?

    Posted on 26-Aug-10 at 8:05 am | Permalink
  48. Geert-Jan

    Hi Boone,

    Thanks for the quick reply. I’m running PHP Version 5.2.6 on SunOS 5.11 snv_105 i86p. As said, it’s working fine for wordpress etc… no problems so far.

    Not sure if this has anything to do with the problem: When I open for example the bp-functions.php in vi I get this message ‘”bp-functions.php” [Incomplete last line] 1543 lines, 50045 characters’ which means a missing \n at the end of the file (so it’s not ‘officially’ unix compatible as the \n is supposed to be there for unix text-files). Might it be that it has something to do with the fileformat? When I do append a carriage return to the file it still doesn’t work btw.

    Posted on 26-Aug-10 at 4:38 pm | Permalink
  49. @Geert-Jan:

    I am getting the same error but on a Linux server.

    Kernel 2.6.28-10.40.intel.E1000E.BHsmp (x86_64)
    MySQL 5.1.47-community-log
    Apache 2.2.16
    PHP 5.2.13

    The groups seem to be importing, despite the errors though. Every page is very consistent with the errors (we have over 200 groups, so it creates approximately a dozen on each , then the errors appear. I refresh, and the same thing happens again.

    I haven’t done a proper evaluation yet to determine if the comments and discussions from each group have been imported yet. That’s next on my TODO list.

    Posted on 26-Aug-10 at 5:48 pm | Permalink
  50. OK, even though the groups are being created, neither the comments nor the discussion topics are being imported!

    The biggest example is the New England group, they have used the comment area extensively (with 932 pages of comments), and they also have 16 pages of discussion topics.

    Live Site
    http://www.coinopspace.com/group/newengland

    Test Site
    http://cos-bp2.brianhanifin.com/groups/new-england-arcade-collectors/

    Posted on 26-Aug-10 at 5:58 pm | Permalink
  51. Geert-Jan

    Ok, found the solution. In bp-functions.php some codeblocks start with only <? instead of <?php. Replacing them will solve the problem. I have imported useraccount even though the process stops there with the message no accounts created (which is not correct, as the users are added). Moving on to the next step over here :-)

    Posted on 26-Aug-10 at 6:28 pm | Permalink
  52. Geert-Jan

    @boone or anyone:

    Have succesfully imported most member data now. Works best in a fresh install I found out (fails fatal on an existing install with some existing content on importing meta user data). Avatars are not loaded however and also groups and discussions and blog posts. It’s looking for a … groups-local.json etc… (file_get_contents(../wordpress/wp-content/ning-files/ning-blogs-local.json) [function.file-get-contents]: failed to open stream etc..) but it doesn’t exist in my ning archive. Is this a problem with an incorrect export from ning?

    Posted on 26-Aug-10 at 7:03 pm | Permalink
  53. @Boone:

    I just tried it from a fresh install, and here is the first output on the groups import stage. Interestingly no mysql_get_server_info() errors appear here. http://pastebin.com/ada5sACG

    On the 2nd page, the mysql_get_server_info() errors appear. http://pastebin.com/DamHpmc2

    None of my groups (not even the ones from the 1st page, without the mysql_get_server_info() errors) have comments or discussions imported. :(

    Posted on 26-Aug-10 at 8:16 pm | Permalink
  54. Oh, and I tried adding php to the end of the <? lines like Geert-Jan suggested, and I didn't have any change in behavior.

    Posted on 26-Aug-10 at 8:25 pm | Permalink
  55. Geert-Jan

    @Brain

    You have to replace all the appearances of <? at the beginning of each codeblock with <?php and it should work. First one is at line 1163 and then on. It solved the problems I had at least.

    Posted on 26-Aug-10 at 8:33 pm | Permalink
  56. Geert-Jan

    I’ve now imported everything, but had to make a change again. I fetched a fresh update from Ning and still no -local.json files for anything but members. I changed line 91 in bp-functions.php to

    $json = WP_CONTENT_DIR . ‘/ning-files/ning-’ . $type . ‘.json’;

    so the import wouldn’t look for the -local.json files. Everything is imported now, except for the avatars and other graphics…

    Posted on 26-Aug-10 at 9:36 pm | Permalink
  57. Geert-Jan – Thanks so much for the comments, they’re extremely helpful.

    I’ve replaced the

    Very strange that your Ning export had no -local.php files. The reason I use the local ones is because that way I’m able to import things like avatars, as the only difference between the -local.php files and their non-local counterparts is that the -local.php files contain URLs that are relative to the export directory. Eg avatar paths go to the local members/ directory rather than to the Ning URL. Every Ning export I’ve seen to date (probably about 10 of them) has contained those -local files, but then again in my experience they’ve been inconsistent in a number of other ways, so perhaps I shouldn’t be surprised. Anyway, changing line 91 in the way you did is a better solution than nothing, since at least it gets you your content.

    Posted on 27-Aug-10 at 6:22 am | Permalink
  58. Brian – Stupid question, maybe, but are you going through the rest of the import process? Groups are created first, and only two steps later does the plugin attempt to import discussion/forum topics for that group.

    As for your mysql_get_server_info() errors, I am a bit perplexed. I looked at the line in question (1582 in wp-includes/wp-db.php) and, weirdly, it’s in the method db_version(). It’s possible that you might be able to work around the problem by manually changing the way that that function returns a value, maybe something like this: http://wordpress.org/support/topic/mysql-server-version-check. It’s a hack, but it might get around the errors. As for the cause of the errors, the fact that it’s only happening on the second page of imports makes me think that it’s a problem with the data you’re putting in. Either the data is not properly formatted (which I’ve seen several times in Ning exports), or there’s something unexpected in the content that the plugin isn’t designed to handle.

    Posted on 27-Aug-10 at 6:30 am | Permalink
  59. Geert-Jan

    @Boone

    That’s explains why the avatars are not loading for me. I do have a members-local.json and the avatar images in the export, but for pages, posts, etc… there’s no local. Maybe it’s because they do not contain images originally in Ning, as in my case? You could make line 91 conditional: first look for local and if it’s not there fetch the default one. That way it should always work. Great plugin anyhow!

    Posted on 27-Aug-10 at 6:43 am | Permalink
  60. Boone,

    I should point out that the network admin uploaded all but the discussions file(s) for this test site. Are the comments from each group stored in the groups json file, or are all comments and discussions in the discussions file? If so then that is my problem.

    Posted on 27-Aug-10 at 4:55 pm | Permalink
  61. Aha, that’s the problem! Group discussions are stored in the discussions json files. If they’re not uploaded, Import from Ning will have nothing to import.

    Posted on 28-Aug-10 at 6:43 am | Permalink
  62. So, just to clarify: the comments at the bottom of each Ning Group are in the discussions file?

    Posted on 28-Aug-10 at 11:02 am | Permalink
  63. So group “comments” are different from group discussions? I didn’t know there was such thing as group comments, so I didn’t write anything in the plugin to import them. That would certainly explain it!

    Posted on 28-Aug-10 at 12:17 pm | Permalink
  64. Look at the bottom of this group, and you will see some people use the comments as an unthreaded discussion forum.

    http://www.coinopspace.com/group/newengland

    We definitely don’t want to lose those discussions.

    Posted on 28-Aug-10 at 1:14 pm | Permalink
  65. OK, thanks for that. None of the exports I had access to contained group comments like that. I’ll try to dig one up so that I can add that import functionality to the plugin.

    Posted on 28-Aug-10 at 1:19 pm | Permalink
  66. I will get the admin to upload the discussions files, and then I can get you a copy somehow.

    Posted on 28-Aug-10 at 3:05 pm | Permalink

+ 22 Tweets

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*