Closed (fixed)
Project:
User Import
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2008 at 02:20 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
liliplanet commentedHi. *bump* sorry.
Just would like to know please if 6.x will have http://drupal.org/project/content_profile as a feature with User Import? and if there is perhaps a timeframe for this?
If not, going to have to import 14 000 users manually, and should start now to be done next year sometime :)
Look forward to any reply, and thank you.
Lilian
Comment #2
robert castelo commentedHi Lilian,
I don't have any current plans to integrate Content Profile with User Import.
User Import is coded in a way that makes it possible to cleanly add integration with other modules, it provides hooks to do this for the user interface and the actual import. I put some time and effort into providing these hooks because there is no way I can keep up with requests to integrate User Import with module X, Y and Z.
This means you can either code that integration yourself or hire a developer to do it for you. The integration should be done in an include file in the user_import/supported directory, look at the other integration files in there to see examples.
Comment #3
neilnz commentedActually, since Content Profile is a progression of Node Profile in D5, with a very similar API, it is mostly possible to copy the node profile support that ships with the D6 version of user import (but probably shouldn't, since there is no node profile for D6), rename it and its calls to content_profile, and make a few tweaks to deal with new conventions in node_import and CCK.
I've made a very hacky initial version that works enough for me to import simple text fields, someone else might like to rewrite it properly, but I found I was going to need a lot more knowledge of node_profile and CCK development to do this in a better way.
Robert, I think it would make sense for whoever wrote the node profile support to port it to content profile, since they obviously knew what they were doing, and it is really just a refresh rather than support for something completely new.
I agree that supporting obscure other profile methods should be done by someone else, but Content Profile is quite a popular module, and is the upgrade path for Node Profile users coming from D5.
This patch places a new file, content_profile.inc, into the supported directory of user_import. It will be loaded and used automatically by user_import.
Comment #4
neilnz commentedComment #5
robert castelo commentedHi neilnz, I wrote the original Node Profile integration, and will definitely update it for Content Profile module in future.
How soon I get round to it depends on how much free time I get to work on it.
Comment #6
socialnicheguru commentedhi,
I have a site and I upgraded from node profile to content profile
I enabled each node profile as a content profile
When I edit the content profile, no information is filled in.
I re-enter the info
I click submit
I get an error- this user already has a content profile
All the information is in the node, but I can't get content profile to populate with the data.
Is there something else I should do.
I this patch intended for this situation?
Thanks,
Chris
Comment #7
neilnz commentedHi activelyOUT,
No, it sounds like your issue isn't with user_import, which this thread is about. You should post any issues with Content Profile (and its upgrade process) to the Content Profile issue tracker at http://drupal.org/project/issues/content_profile
Neil
Comment #8
dejamuse commentedSupposedly you can import users AND populate content-profile fields using the new Migrate module. I'm in the midst of trying to figure out exactly how to do this, but I discovered this capability by watching the video of the presentation by Moshe Weitzman and Mike Ryan at Drupalcon-09.
The discussion is in response to an audience question at the 44 min:25 sec mark.
Here's the video link: http://dc2009.drupalcon.org/session/migration-not-just-birds
It involves setting up relationships using the Table Wizard module first, using Views to define the relationship. Also involves foreign keys, I believe, which confuses me because AFAIK that's only available using the InnoDB engine in MySQL.
As soon as I figure this all out, I'll post back here.
I created a support request at the Migrate module page: http://drupal.org/node/444506
Migrate module: http://drupal.org/project/migrate
Relevant discussion: http://drupal.org/node/440982
General discussion wiki for data migration: http://groups.drupal.org/migration-drupal
Comment #9
Leonth commentedSubscribing.
Comment #10
Leonth commentedI tried to tweak this a bit. Seems that I could make the fields appear in the column matching table. Importing user still does not create the profile node, although "test" seems to be ok.
Comment #11
rainbowarrayI found a pretty easy way to do this:
1) Set up all of your user information in a CVS file. I had columns for usernames and e-mail addresses.
2) Import all your users with User Import.
3) Use Node Import to import the rest of the information into a content profile. This automatically syncs profiles with users.
I banged my head against the wall for quite some time trying to figure this out, but this does work.
Comment #12
hansrossel commentedIn addition to #11:
3) Use Node Import to import the rest of the information into a content profile. This automatically syncs profiles with users.
It indeed works because you can set in Node Import the author of a node to a certain column in the csv, so making sure the author of the content profile is the username makes sure that the Content Profile is connected to its user.
Comment #13
kenorb commentedRelated issues:
#374344: Node Import: Support for content profile module
#411328: Import Content Profile data from CSV
Comment #14
kenorb commentedIn attachment.
Comment #15
kenorb commentedtxt version.
Comment #16
hefox commentedAlternate module for content profile +user import
Sorry should have posted this earlier
This is using drupal_execute, which has an issue with node reference (or rather, cache-ed forms); I'll look for the issue about that later. However if you apply the batch api patch + limit number to 1 per batch run that'll get around it. Any since it's using drupal execute, really want to use batch api since drupal execute is slow, but thorough. (Node save can miss stuff).
(Legal: Development has been sponsored by the Initiative in Innovative Computing at Harvard University, the Massachusetts General Hospital and DERI Galway.)
Haven't used it in a bit but I think other than the drupal execute issue it's working.
Comment #17
kenorb commentedStill can't get it working.
After importing around 1700 users, I've got WSOD and following error on Chrome browser:
Error 325 (net::ERR_RESPONSE_HEADERS_TOO_BIG): Unknown error.
Both on Windows and Linux servers.
I'm not sure if it's user_import bug or related to content_profile patch.
WSOD URL: admin/user/user_import/add/5/
Reported Chrome bug here:
http://code.google.com/p/chromium/issues/detail?id=17980
UPDATE: On Firefox it worked.
Comment #18
mat. commentedHefox: Does your module create automatically new content profiles?
I tested it and I do not think so..
Comment #19
hefox commentedIt has and should be; we've imported thousands of users with it and it created their profiles for them. May have some site specific code but I think I got rid of most of that?
Comment #20
WildKitten commentedHi hefox, I would like to try your module, but I have few questions.
1) Do I save those 2 files from zip in sites/all/modules/user_import_cp, or somewhere in sites/all/modules/user_import/ dir?
2) Can you give an example how the lines in .csv files should be written? I mean , do you write all fields from your content_profile_types, after username, password....
3)Does it work if you have 2 or more content_profile types?
4)Have you tried it with content_multigroup from cck module?
I would really appreciate you help on those questions. Thank you.
Comment #21
hefox commented1) It does not matter where it is put; it's a seperate module (but modules can go under other modules).
2) Should follow the same format as user import; fields should appear in the drop down like password etc. does
so it'd be like (new computer, don't have my old testing files). Something like:
username, password, title, address
blah, blah, blahblah, 5 blah lane
3) I have not tested this, but welcome to try! I tried writing it in a way that /should/ but again, haven't tested it so there's bound to be issues
3) No, I have not tried out multi group myself yet so have no idea about this, but I extremely doubt it.
Comment #22
WildKitten commentedHi hefox,
thank you for fast reply. I made .csv file with fields: "name","pass","mail","access","status","init","timezone","field1_from_my_content_profile_type1","field2_from_my_content_profile_type1"
In table users, all data have been imported great, but in my_content_type table none of those data have been inserted. I have to
mention that I have 2 content_profile_types, so maybe that is the problem.
Anyway, thanks again for response.
Comment #23
hefox commentedmy guess is something is causing an error that's preventing it from being saved. Are all required fields being filled ?
Someone else has tried and reported, hard to debug since I can't reproduce
Comment #24
hadsie commentedthanks @hefox, this worked for me. It would be great if this could get included as part of the module or as another contrib module if including it with user_import isn't possible.
Comment #25
joachim commentedTwo tweaks on #15
- node import now seems to return its fields as "cck:field_SOMETHING" so the string test needs to be changed
- if, for whatever reason you have no cck fields defined on a content profile type, then the array_merge fails and you get nothing back from any other types you might have. So added a check for that.
I've run a test import with this and the content profile node was created with CCK data in it.
Please could a maintainer commit this, as working through a long issue with multiple patches really isn't fun :/
Comment #26
H3x commentedI'm having trouble updating existing content profile nodes with the content_profile.inc file from kenorb. Anyone have any clues? I can successfully create new content profile nodes... but updating just isn't working, no matter which update option I choose.
Comment #27
scottrigby@joachim: seems to work well for imports :)
I think this is more minor, but still want to point out that the 'Update existing users' option doesn't seem to work (neither 'Replace Data' or 'Add Data').
Comment #28
iaminawe commentedI just wanted to ask for a little clarification with regards applying this patch.
Do I need to apply the patch form #3 before applying the file in #25? If so what file to I run it against?
Then with the txt file in #25, do I just rename it to content_profile.inc and put it in the content_profile folder?
Thanks for any guidance with this
Gregg
Comment #29
kenorb commentedVersion: #15 + #25 + some improvements:
- show error on fail
- updated variables and comments to more appropriate
Comment #30
kenorb commentedComment #31
robert castelo commentedJust added support for Content Profile in User Import 6.2.3.
Thanks to joachim and kenorb for patches, and everyone else for testing and help.
I fixed adding and updating data to an existing profile, and squashed various other bugs.
By the way, don't use split(), as it will be deprecated in PHP 5.3, use explode() instead.
I tested against:
Content Profile 6.x-1.0-beta4
Node Import 6.x-1.x-dev
Comment #32
robert castelo commented