Drupal 7 has a few choices for storing user profile data - the core user fields, and the Profile 2 module. While there is official migration path built for Content Profile, there is a project called Content Profile Converter that provides some Drush commands able to migrate data from profile nodes to user fields or Profile 2 profiles. That is the suggested upgrade path for now.

Original request

I apologize if this is a dupe. Searching on "D7" or "7.x" is not allowed and "core" turned up nothing useful.

With users being fieldable objects in D7, it seems to finally make sense for most folks to drop the nodes as profiles route. There are still some cases to be made for having them be nodes but the biggest, using CCK with them, is no longer a reason. Folks starting with D7 will likely choose the pure fields route but those of us upgrading from D6 have a decision to make.

I'm wondering what you, as the maintainer of the key profile as nodes module, have planned for D7? Are you intending to port Content Profile as is and continue down the profile as nodes route? Or are you planning on writing a converter to core fields?

To be clear, I don't expect work on anything to be starting now. :) I'm just wondering about your plans, if any, so I can make plans of my own. This might be a good thing to document on the project page as well since it's hard to search on.

Thanks,

Michelle

CommentFileSizeAuthor
#110 profilemigrate.zip2.94 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

EgbertB’s picture

subscribing

chrisroditis’s picture

i am interested to hear fago's position as well. I for one intend to continue using nodes as profiles since I need profiles to support drupal's native comments and moreover in some cases I will be needing my users to maintain more than one profile which is a no-go with the user-as-profile solution.

Michelle’s picture

I'm in the opposite camp. I don't use the comments on the nodes since I (currently) use guestbook and will be moving to FBSS for that. I don't use multiple nodes per user but rather use fieldsets on a single node. There's really nothing in what I do that needs profiles to be nodes except for wanting to use CCK, which is moot in D7. So I'd like to convert but I don't know enough about CCK / FieldAPI to write a converter.

Michelle

scroogie’s picture

This would indeed be interesting to know. Just like Michelle, I just use content_profile to extend the Profile page with CCK.
I guess a decision would depend on the outcome of those issues though:

http://drupal.org/node/394720
http://drupal.org/node/501408
http://drupal.org/node/516138

fago’s picture

Ideally I do think profiles in d7 are separate entities - I think that's conceptually right and personally I don't care much about comments either.
See http://drupal.org/node/394720#comment-2022166 for more about that.

KarenS’s picture

I went back and forth on this for a long time and finally decided it makes more sense to convert now, in D6. In particular:

1) The fields available in Content Profile are much more flexible and useful. You can choose how to format the results and there are lots more types of fields and settings options.

2) Some fields just don't work well in Views as profile fields. One of these is the date field, which is stored as a serialized array by the core profile module. That means you can't sort or filter by that value in Views. So the only useful way to have a date field in Views is if it is a CCK field.

3) If you convert in D6, you will go into D7 with regular CCK fields, which will automatically get the same upgrade processing that all other CCK fields get. If you don't, you'll be part of a smaller group of users using a different upgrade path that may not be as well tested or as widely used.

So I'm converting now.

I created a new module at http://drupal.org/project/profile_migrate. It's brand new and needs testing, but if you want to protect yourself with backups and do some testing you can try it out and help test it.

fago’s picture

Cool! I added a link to profile migrate on the project page.
I also added a note about the relationship to content profile on the profile2 project page: http://drupal.org/project/profile2

The upgrade path from content profile to profile2 shouldn't be hard, but probably we should keep the nodes wrapping the profile2 entities - thus it would make sense to have content profile in drupal 7 for using nodes to wrap profile2 entities. People don't needing nodes could disable content profile2 after the upgrade. Opinions on that?
Certainly I could also need help, in particular with the upgrade and nodes-as-wrapper parts.

Bilmar’s picture

subscribing

Encarte’s picture

subscribe

cyrusvhadsupper’s picture

subscribing

AdrianB’s picture

Subscribing

sfyn’s picture

sub

Unrelated, but I am trying to find an upgrade path from usernode in D5 to content-profile in D6

YK85’s picture

I would like to confirm that if I still want my user's profiles to be nodes then I will need Profile2 module as well as Content Profile module in Drupal 7?

robby.smith’s picture

+1 subscribing
any plans for this in the near future?

Peter Bex’s picture

subscribing

xjm’s picture

Tracking.

jods’s picture

Subscribing.

durum’s picture

sub.

maverick14’s picture

+1 follower

arrow_ben’s picture

Subscribing.

BenK’s picture

Subscribing...

maverick14’s picture

Any idea whey we can expect a first d7 release?

matt2000’s picture

sub and +1 on making this a 'wrapper' for Profile2

yeeloon’s picture

subscribing

Anonymous’s picture

tracking

EvanDonovan’s picture

Using Content Profile as a node-based wrapper for Profile 2 makes sense to me.

johnv’s picture

subscribing.
My sites have lots of profiles, but few users; so I prefer a separate Content Profile, rather then an updated user.profile.

bayousoft’s picture

subscribe

fago’s picture

Looks like I've to concentrate on profile2 for d7. Anyone wants to take over D7 development + maintenance? -> Contact me.

Michelle’s picture

As long as there's a way to convert existing profiles, I'd be moving to profile2. So not me, sorry.

Michelle

palik’s picture

subscribe

chaloalvarezj’s picture

subscribe

Fidelix’s picture

Subscribing

Shadlington’s picture

Subscribing

Jason Dean’s picture

Subscribing

OFF’s picture

Subscribing

mrvinch’s picture

sub.

yngens’s picture

Title: content_profile: D7 plans -- Port or convert? » D7 plans -- Port or convert?

I am planning to upgrade one of the sites, which currently is using core profile module, from D6 to D7. I'd like the website to continue using core profile module, but not the one from D6, which is hidden and can be activated in D7 too, but the new one, which makes users fieldable objects. As I understand simple unhiding and activating the core profile module from D6 will not automatically convert user profiles to D7's new approach. So my question is what is the best way to make this transition:

1) Converting to Content Profile while in D6 and upgrading the website to D7. Can Content profiles in this case easily turned into fieldable user objects in D7? Or we have to first convert Content Profiles to Profile2 and then migrate to core profile module of D7?

or

2) Upgrading the website to D7, activating hidden profile module from D6 and dealing with converting it to core profile module for D7?

Could someone enlighten this confusion for me to avoid extra unnecessary steps, please?

EvanDonovan’s picture

@yngens: I don't know if a clear upgrade path has been outlined yet, for either Content Profile or D6 Profile module to either D7 user fields or Profile2 fields.

If the patch to allow D7 user fields to show during user registration gets committed, I think it might be possible for you to use "straight up" D7 user fields, without worrying about Profile2, unless you need more complex functionality.

If you upgrade to D7, core Profile module will not be hidden for you, since you have data. It is only hidden for people who are doing a fresh install of D7, or upgrading a D6 site without profile data.

If I were in your situation, I would probably upgrade to D7 and then create the profile fields as user fields, unless there are too many of them to create manually. Then I would write a script or a module to migrate the data, probably by using the API rather than straight SQL. But I would probably wait until the patch to allow the user fields to show in registration is committed.

yngens’s picture

EvanDonovan, thanks for suggestion, I'll wait till some kind of safe path is available.

maori’s picture

sub

Witch’s picture

subscribe

jerry’s picture

Subscribing.

Anticosti’s picture

Subscribing...

altrugon’s picture

Keep me updated.

wfx’s picture

Subscribe

I'm currently upgrading from Drupal 5 to Drupal 6. No Content Profile installed yet but I was looking into it. Not migrating to Drupal 7 for at least a year. Guess we'll have plain vanilla profiles unless there is an upgrade path.

Tebb’s picture

Subscribing.

David D’s picture

subscribing

strellman’s picture

Michelle, did you ever find a converter or perhaps a snippet to use with VBO?
I am also interested in converting to the core profile before moving to D7.

Michelle’s picture

No. I'm a long way from using D7 so haven't looked into this, yet.

Michelle

clashar’s picture

Subscribe

yugongtian’s picture

+

Mateo1041’s picture

Subscribing.

jacov’s picture

subscribing

danielm’s picture

subscribe

Tebb’s picture

Title: D7 plans -- Port or convert? » content_profile: D7 plans -- Port or convert?

Changed title to make module name visible in Dashboard.

CardinalFang’s picture

subscribing

Subbo’s picture

Subscribing

Golem07’s picture

subscribing

liza’s picture

sub'ing

furamag’s picture

What is the best way to convert Content Profile (D6) nodes to Profile data (D7)? If each user has just one profile we can convert data and use out of the box Profiles (D7). If there is no way to convert Content Profile nodes to Profile data I can create module for this type of migration.

paulgemini’s picture

subscribing

EvanDonovan’s picture

@furamag: I think creating a module, similar to the one that converts Drupal's old Profile module data to Content Profile data, would be helpful for people who have simple needs. I presume that you are referring to using fields to build a profile, rather than the pre-7.x Drupal core Profile module?

furamag’s picture

@EvanDonovan: Yes, I mean I want to create module to migrate Content Profile (D6) to user fields (D7).

johnv’s picture

In profiel 2, issue #893032: extension modules: profile_anonymous treats the same issue, from a Profile2 perspective.
It treats 'anonymous profiles', which can or cannot be attached to entities (e.g users)

D7 Content Profile can build upon Profile2 via the folowing steps
In Profile2:
- change fields profile-uid to profile-entity_id + profile-entity_type (an entity reference), so you can relate to 'any entity' (Orders, Universities, Terms, etc.)
In Profile Anonymous / Content Profile:
- Add a flag 'anonymous profiles possible' to the profile type. Setting this flag opens a UI, so you can:
-- create profiles via profile2/add/myprofile; the table 'profile' will only have fields profile-pid and profile-type set;
-- set the owner of the profile, setting the entity reference field in table 'profile'.

likewhoa’s picture

subscribing

peter292’s picture

subscribe

andrenoronha’s picture

subscribe

izus’s picture

subscribe

Kiphaas7’s picture

sub

myregistration’s picture

subscribing

Kiphaas7’s picture

fago: do you have some general pointers/vision on how to wrap profile2 around the node entity? I'm still kinda new to the whole entity stuff, but I do have a need for wrapping profiles around nodes and don't really know what would be a good start for coding this.

Maciej Lukianski’s picture

subscirbing

vinoth.3v’s picture

Title: D7 plans -- Port or convert? » content_profile: D7 plans -- Port or convert?

Any update on this?

I still like to use nodes as profiles. but I didn't find a way to relate profile2 with user in views/panels yet.

likewhoa’s picture

Title: content_profile: D7 plans -- Port or convert? » Port Content Profile to Drupal 7
Category: feature » task
Issue tags: +port to d7. d7 porting
dargno’s picture

* subscribe *

I really need to have comments on the user profile. What would be the best solution to that? Is there anything I could do to to hasten the development?

I tried the following things already

- Installing Profile UX -> nothing gained
- Installing Profile 2 -> no extra benefits regarding comments, adjusting template works good enough
- Installing Guestbook -> cant get it to display without the tab, below the profile
- Manually inserting comments at the user profile (see below)

Manually inserting node view on user profile:

- Used core fields for the user profile itself
- Created a nodetype "profile-comments"
- Created a rule to autocreate a node for new users
- Built a view to show the full node, hiding the node itself with tpl and/or CSS
- Added a htaccess rule to redirect the profile nodes to the user profile (just to be sure)

Views doesnt show the comments anymore (grrr) since the last update though so i'm kinda stuck on that, and its still a workaround which isnt 100% integrated.

I'm almost to the point of remaking the site again in Drupal6, just to get this really important feature working again...

scroogie’s picture

The best way would imho be to work on #893854: Make comment module available for entity not for node which aims to implement comments on any entities.

dargno’s picture

*bump* any update on this? Should an update to 7.x-dev provide profile comments or should people look into the issue shown above? That issue is marked as a duplicate of #731724: Convert comment settings into a field to make them work with CMI and non-node entities for further reference.

Another solution would be using facebook-style-statuses (http://drupal.org/project/facebook_status), though i'm not sure if it would do the same as what this module branch can/will provide...

EvanDonovan’s picture

@dargno: Couldn't you add a node reference to a user entity, and then set up the tpl.php for the user profile to load the referenced node? You'd still need your code to auto-create a node though, probably.

vinoth.3v’s picture

but what the community needed is easy upgrade path from content profile 6 to "the new solution for drupal 7"

alternatives are always welcome.

EvanDonovan’s picture

Well a content profile is just a node with CCK fields, so the content profile itself can migrate like a regular CCK migration. And then to tie it to the user, you'd have to write some kind of module that linked it up via user reference. Or else do the Profile2/node wrapper method fago mentioned way earlier, but that would be harder to code.

As for me, this issue doesn't affect me, nor do I have the time to work on the code, nor am I a maintainer of this module - I'm just trying to provide advice.

dargno’s picture

With the combination of rules i just set the creator of the node to the user that is created, and use the reference from there. Just got to hide the creation of new nodes from the users (dont know if permissions can do or if the rules cant create the page then anymore either).

Another thing is that there are many references to the user like when they create a node, or write a comment. I'd like those references to go to the proper page, hence i tried to connect the node to the user in a block, instead of the other way around...

A simple hook(?) to predefine and connect a node(type) to a profile and using that mainly (up to the developer) for comments would be the easiest solution, while if the developer of the sites wants to, any other CCK references can be used as well, like flickr photo's or any fields that are somehow not supported by the core profile module.

Would that be a solution? Or would checking out facebook-style-statuses or guestbook be a better solution?

- dargno

PS: can someone set the version of this issue to 7.x-dev? Its not in the list

Shadlington’s picture

Its not in the list because there isn't a 7.x version. And presumably there won't be.

vinoth.3v’s picture

but here in this issue, we have to conclude the followings:
1. Will Content Profile module have Drupal 7 version?
2. if not, what are the suggested solutions for the successful upgrade. whether it is profile2 node wrapper or node reference fields.
3. how we can achieve the same functionality that Content Profile provides now (show/hide fields from user registration, user to node one to one relationship restriction, tabs for profile editing/view etc.)
4. Profile2 Integration to views and panels.
5. Documentation/example/automatic migration module from content profile to profile2/profile2 node wrapper/node reference solution.

but my question is instead of having new module for profile2 node wrapper why content profile shouldn't provide this same functionality in its drupal 7 version.

paulgemini’s picture

Not sure if this helps, but you can expose profile 2 fields in a content type using display suite and taxonomy entity index:

http://drupal.org/node/1195442#comment-4666022

You might also look at the Relation module:

http://drupal.org/project/relation

EvanDonovan’s picture

@vinoth.3v: Well, it looks like there's no one currently who has the time to maintain Content Profile in a D7 version. They are volunteers, after all.

If we get confirmation of that from the maintainers of this module, and can answer some of the other questions you've helpfully laid out in a docs page, and then get the maintainers to link to that docs page on the project description, then I think we could mark this issue "closed (won't fix)", since that appears to be the proper status.

But we shouldn't do that until documentation of the proper migration path is made.

Also, I think another way to handle Profile2 in theory would be to load into a content pane in a Panel and then override the user/%user path with the resulting Panel. But I'm not sure if Profile2 exposes content panes - perhaps that would have to be written as a CTools plugin.

paulgemini’s picture

This issue discusses Profile 2 and Panels:

http://drupal.org/node/1011370

jaxon77’s picture

I need the profiles to be able to use comments and five star rating with the ability for guests to add the profiles of users and the actual user to later be able to claim that profile. I can't figure out how this will work with profile 2

sun’s picture

Title: Port Content Profile to Drupal 7 » Upgrade path to Profile2 in Drupal 7
Component: Documentation » Base module
Issue tags: -port to d7. d7 porting

Profile2 is the successor of Content Profile. The way forward is clear, we need to write an upgrade path.

There are only two things to be discussed:

  1. In which project should the upgrade code live? content_profile 7.x, or profile2, or...
  2. CCK? CCK's content_migrate module already seems to contain code for originally non-CCK fields (e.g., filefield) - might make sense to centralize CCK upgrade efforts into a single space? (so you also don't have to download gazillions of different migration helper modules you'll delete in the end...)
Kiphaas7’s picture

I thought this topic was about porting content profile to D7, as a wrapper around profile2? For those people that still needed their profiles to be nodes.

Michelle’s picture

Title: Upgrade path to Profile2 in Drupal 7 » Content profile: Create upgrade path to profile2 and port to Drupal 7

Well, technically, the topic was a question to Fago about his plans and whether he was going to port the module or offer an upgrade path. Back in #7, he indicated he thought it was worth upgrading but it doesn't look like he intends to be the one to do it. Since Sun isn't listed as a maintainer on this module, I'm reversing his unilateral decision to change the subject of the issue I started.

There are two issues here:

1) Those who don't have need of nodes in D7 need an upgrade path to Profile 2
2) Those who still need nodes in D7 need a port of Content Profile to D7, which makes sense as some sort of wrapper around Profile 2 rather than a completely different module.

I'm not volunteering to do either, just clarifying the issue. If we have volunteers for either of these, I suggest breaking off into a new issue to discuss concrete plans as this issue is more of a meta discussion.

Michelle

pmitchell’s picture

Subscribing, I imagine content profile upgrade / migration is one of the biggest holds on D7 upgrades (it is for me at least)

skizzo’s picture

subscribing

Liliplanet’s picture

subscribe thx! upgrade from content profile to D7 profile2 ..

KarenS’s picture

Content Migrate should be able to successfully create D7 nodes from the D6 nodes, with all the fields intact. They won't be profiles but the data will be there. Then we need some way to transform a D7 node to a D7 profile, which hopefully would be a much simpler task than trying to tackle the whole D6 -> D7 upgrade path. Maybe something like create a D7 profile (even if it means that the site admin will have to do that part manually) then provide a place where the user can identify which content type contains the data that needs to be moved to the new profile. The act of moving the data from the node to the new profile would, I think, just be a matter of replacing the name of the entity in a couple of tables and then clearing the caches.

I don't have time to do it, and none of this is tested, but if it is framed this way maybe it is something some else could get working.

Liliplanet’s picture

Perhaps any news on how to upgrade from content_profile to profile2 please?

update to D7 is stalled as unable to convert 18 000+ profiles one-by-one :)

fago’s picture

#91 very well summarizes this issue.

>Well, technically, the topic was a question to Fago about his plans and whether he was going to port the module or offer an upgrade path. Back in #7, he indicated he thought it was worth upgrading but it doesn't look like he intends to be the one to do it.

Yep, I've currently no plans to work on that. Contributions are welcome, of course. #95 very well describes how the upgrade could/should work, thanks Karen.

ad #89:

>In which project should the upgrade code live? content_profile 7.x, or profile2, or...
I think we should put the upgrade code into content profile, so the upgrade path can keep the old nodes and turn them into nodes wrapping the corresponding profile2 entities. Afterwards people could turn content-profile off if they don't need nodes.

Liliplanet’s picture

Priority: Normal » Major

Sorry to re-address this issue .. totally stuck here as cannot update to d7 and all development has stalled.

Has anyone perhaps found a solution (as no upgrade path available) via export/import of D6 content profile to D7 profile2 please?

I have tried:

http://drupal.org/project/feeds
no Profile2 fields available to import to, see http://drupal.org/node/1228062

http://drupal.org/project/migrate
only imports basic data (username, password, email), see http://drupal.org/node/1231404

Any concept on how to upgrade to D7 would be absolutely fabulous :) and thank you.

Michelle’s picture

I have a script that I wrote that incorporates a script I found that updates nodes from an XML file. That might be a possible route... Save all the content profile nodes out to an XML file and then pull them in D7 with the script. The main issue I see is my script assumes the nodes already exist because it's designed to update nodes. So you'd have to add in something that would create the nodes. It also would need to be adapted to use some sort of batching if you have a ton of users, I think.

If someone has the skills to take it the rest of the way, I can post what I have....

Michelle

xjm’s picture

The route I've used in the past is creating batch job scripts that I've run with drush:
http://drupal.org/node/873132

Michelle’s picture

I've been working on this today because I need to pull some content profile info from the old D6 site into the new D7 site. This code is very site specific and will likely blow up if you throw thousands of users at it. I _just_ got it working and haven't done much testing because I need to leave. I'm putting this up here in case it helps anyone but don't expect to be able to just drop this into your site and have it work as is.

Step 1: Get Views Bonus Pack on D6 and make a view of Content Profile nodes that exports the fields to XML. Make sure you include the UID and that all your labels are lower case with no spaces in them. Export the XML dump to a file.

Step 2: Adjust the following code as needed to match your site and run it.


function lacc_menu() {
  $items = array();

    $items['import-people'] = array(
    'menu_name' => 'main-menu',
    'title' => 'Import people', 
    'page callback' => 'drupal_get_form',
    'page arguments' => array('lacc_people_import_form'),
    'type' => MENU_NORMAL_ITEM,
  );

  return $items;
}

function lacc_people_import_form($form, &$form_state) {
  $form = array(
    '#tree' => TRUE,
    '#attributes' => array('enctype' => 'multipart/form-data'),
  );
   
  $form['lacc_people_import_file'] = array(
    '#type' => 'file',
    '#title' => t('XML file containing the people results'),
  );

  // Submit button
  $form['submit'] = array(
  '#type' => 'submit',
  '#value' => t('Import'),
  );
  
  return $form;
}

function lacc_people_import_form_submit($form, &$form_state) {
  // Grab the file and save it to the temp directory.
  $validators = array('file_validate_extensions' => array('xml'));
  if ($file = file_save_upload('lacc_people_import_file', $validators, 'temporary://')) {
    $people_file = drupal_realpath($file->uri);
  }

  lacc_import_people($people_file);

  drupal_set_message('Import process complete.');
  
  return;
}

function lacc_import_people($file_to_parse) {
  // Load XML file and turn it into a PHP array.
  $xml = new SimpleXmlIterator($file_to_parse, NULL, TRUE);
  $namespaces = $xml->getNamespaces(TRUE);
  $people_list = xmlToArray($xml, $namespaces);

  // Strip off outer layer of array.
  $people_list = $people_list['node'];
  
  // Iterate through the people_list array and update each profile with the data.
  foreach ($people_list AS $row_id => $person) {  
    $account_id = (int)$person['uid'][0];
    $first_name = $person['first-name'][0];
    
    // Load the profile for the user that coresponds with the row from the XML file.
    // Create it if it doesn't exist.
    $profile_type = 'profile_contact';
    $profile = profile2_load_by_user($account_id, $profile_type);
    if (empty($profile)) {
      $profile = profile_create(array('type' => $profile_type, 'uid' => $account_id));
    }

    // Fill in the data from the XML file
    $profile->field_profile_first_name['und']['0']['value'] = $first_name;

    // Save the profile.
    profile2_save($profile);    
  }

  return;
}

function xmlToArray($xml,$ns=null){
/* Source: http://gaarf.info/2009/08/13/xml-string-to-php-array in comment by Rasmus */
  $a = array();
  for($xml->rewind(); $xml->valid(); $xml->next()) {
    $key = $xml->key();
    if(!isset($a[$key])) { $a[$key] = array(); $i=0; }
    else $i = count($a[$key]);
    $simple = true;
    foreach($xml->current()->attributes() as $k=>$v) {
        $a[$key][$i][$k]=(string)$v;
        $simple = false;
    }
    if($ns) foreach($ns as $nid=>$name) {
      foreach($xml->current()->attributes($name) as $k=>$v) {
         $a[$key][$i][$nid.':'.$k]=(string)$v;
         $simple = false;
      }
    } 
    if($xml->hasChildren()) {
        if($simple) $a[$key][$i] = xmlToArray($xml->current(), $ns);
        else $a[$key][$i]['content'] = xmlToArray($xml->current(), $ns);
    } else {
        if($simple) $a[$key][$i] = strval($xml->current());
        else $a[$key][$i]['content'] = strval($xml->current());
    }
    $i++;
  }
  return $a;
}
Liliplanet’s picture

Thank you Michelle, most appreciated .. but unfortunately just did not understand as I ran it as a php file, then as a module as still no import form (sorry a little above my head here)

What am I going to do is upgrade to D7 with profile as a content type and hopefully (soon :) we will have an upgrade path to profile2.

Michelle’s picture

The code can't be run as is as it is specific to my site. You need to change the function names to your custom module, change the profile entity type, and change all the individual fields to your fields. I think that's it... I'm not looking at the code, now, though, so may have missed something.

MIchelle

Liliplanet’s picture

Thank you Michelle. I remember when we where in D5 with nodeprofile (to be able to create cck fields) as basic profile did not have selectable fields in views) .. we then moved to content_profile in D6, also which was also not easy to convert at the time. D5 and D6 moved user profiles to content types as the basic profile module had no cck capability.

After several years of building of profiles as a content type, we are back to the now going back to the needed cck fields on the profile module, yeah!

If this has been the transition from d5, d6 to d7 versions, the database of our users, the most important consideration of any site, the drive, how can this be changed without any ability to upgrade from content type back to profile.module?

We need the ability to convert as mentioned in Karen's #95, just putting this out there :) I will try for the moment how to figure out how to have your content profile attached when you visit your user (profile2) account.

Any suggestions, as always, most appreciated :)

Geex2011’s picture

sub+

bryancasler’s picture

subscribe

larowlan’s picture

sub

ksiebel’s picture

+1

Anonymous’s picture

Hi Michelle,

I've modified your code as needed for my site (test setup with D7.8), however I am unable to get menu item to show up.
Do we need to create a form first or does that code block at the beginning generate a menu item, page, and form for us?

Figured out what the issue was, AND successfully migrated profile fields. ;-)

The code above doesn't have access callbacks/arguments.
In order to get this to work, you'll need to modify the first code block as follows:

function example_menu() {
  $items = array();

    $items['import-people'] = array(
    'menu_name' => 'main-menu',        // change this to the menu of your choice
    'title' => 'Import people', 
    'page callback' => 'drupal_get_form',
    'access callback' => 'user_access',        // You'll need to add this
    'access arguments' => array('access administration pages'),        // And this
    'page arguments' => array('example_people_import_form'),
    'type' => MENU_NORMAL_ITEM,
  );

  return $items;
}

In addition, as mentioned by Michelle in a comment above, the code will have to be adjusted for your own custom module.
So make sure to change the module (hook) names.

Good luck!

Filmore

Anonymous’s picture

FileSize
2.94 KB

I've decided to package up my custom module with all the specifics taken out to make it a it easier for others.
Make sure you generated and downloaded an XML file with Views.
Then the only things you need to add to this module for this to work are the fields you want to import from/to.
Check the comments in the .module file for specifics.

One thing to be aware of before you try to import is that if you have fields that are select lists, make sure to check the Allowed Values List is intact before attempting the import. I personally used the PHP Allowed Values List, and in all of my migrated fields (cck migration) the PHP code was missing so I had to add it manually from my production D6 site.

Hopefully this helps some people out, or even better maybe someone will expand on this and make a gui version for the masses.
Good luck!

Filmore

baby.hack’s picture

A site I am working on uses a lot of node related functionality with profiles, like comments and ratings, etc. I have a dev site up where I have migrated all the D6 profile nodes to D7 nodes. I need to tie them to profiles.

I also need new users to be able to create these nodes on account registration.

I am stuck until an angel with more knowledge and talent than I can produce a node wrapper for Profile2.

KarenS’s picture

As I noted in http://drupal.org/node/560324#comment-4817254, I think the easiest way to do this would be to migrate the field data from D6 to D7 normally so you end up with D7 nodes, then move the fields to a different entity (either the user entity or a Profile 2 entity). I think the new Field Tools module could be the logical place to do it, I just posted a feature request at http://drupal.org/node/1349646.

IWasBornToWin’s picture

@ #82 dargno

I'm using D7

Did you get this fixed? You can use nodes as user profile by creating a view for that node and set the display type as page and show full content. You can use comments or anything else you would do with a node. You can also create a tab within the view("public profile", as example) which shows on the user account page. You filter this view by adding a contextual filter to the user id. I've done all of this.

You can also have a "My Profile" link in the user menu which shows this view to the current logged in user, where they can edit their own user profile info.

I will give you screen shots if you still need help with this.

davycw’s picture

I like this method, but couldn't an user theoretically create as many profile nodes as they want?

IWasBornToWin’s picture

Yes and no--There are several ways to limit it to just one.

1. Do not expose a link anywhere which allows user to add new node
and/or
2. Rules--automatically create a profile when user registers.
and/or
3. Use node limit module here ( Node limit ) where you can limit the user to only create one node.

IWasBornToWin’s picture

I might add, I expect the automatic node title module will be needed also, since node titles cant be duplicates...this field can be hidden and create an automatic id when rules creates the node or when you allow the user to create their one node. Module is here Automatic Nodetitles

dargno’s picture

@ #113 IwasBornToWin

Sorry for the late reply; I tried getting the node with the ruleset as explained at #82, though somehow after a while my view broke and it wouldnt show the comments nor the comment field. So i switched the whole thing around, and i'm using the nodes now. Since in this case I'm fetching the user data from LDAP, that information is read-only saved in the native user profile. All other information is stored in the auto-created node, which is editable by the user. With a slight adjustment of the node.tpl.php for the related content-type, I managed to show the profile fields of the owner of the node in there as well.

At some point i did indeed get the full node at the user profile as a view, though when the view somehow didnt show the comments anymore and i needed some fields to be editable and others not, I thought reversing it and just pointing to the node itself would be the easiest solution.

- Dargno

PS: I'm not sure but i can imagine that you can disable the rights for a user to create a particular node, where the ruleset still could... or is that linked? Otherwise the Node limit module would indeed be a nice addition.

PS2: I think i managed to set with rules the node title to the username, which is unique anyway, so no real need for another module for that i think?

IWasBornToWin’s picture

See imported view below. I am using with content type - profile. I didn't have to hack any code and the comments work fine. I don't think nodelimit mod is needed because in permissions I do not allow users to add this content type. Rules creates it when the user registers, so no need for user to ever add.

The user is able to edit any of the fields (If I allow). I used a couple fields from the user account(user picture) for the profile (because they work well with rules, dynamically) Other than that, I keep them separate.

I added new specific fields to the "profile" content type, specific to profile stuff (family photos, employment, etc.)

On my user account page I have tabs;

view | settings (edit) | profile | my content | etc.

$view = new view;
$view->name = 'my_profile';
$view->description = 'Profile viewable by other users. Accessed through the user account page(by a tab named "profile") when clicking on any username.';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'My profile';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Profile';
$handler->display->display_options['link_display'] = 'page';
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['view_mode'] = 'full';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 1;
/* Relationship: Content: Author */
$handler->display->display_options['relationships']['uid']['id'] = 'uid';
$handler->display->display_options['relationships']['uid']['table'] = 'node';
$handler->display->display_options['relationships']['uid']['field'] = 'uid';
$handler->display->display_options['relationships']['uid']['required'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
/* Field: Content: Edit link */
$handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
/* Field: Content: My categories of interest */
$handler->display->display_options['fields']['field_my_categories_of_interest']['id'] = 'field_my_categories_of_interest';
$handler->display->display_options['fields']['field_my_categories_of_interest']['table'] = 'field_data_field_my_categories_of_interest';
$handler->display->display_options['fields']['field_my_categories_of_interest']['field'] = 'field_my_categories_of_interest';
/* Field: User: Picture */
$handler->display->display_options['fields']['picture']['id'] = 'picture';
$handler->display->display_options['fields']['picture']['table'] = 'users';
$handler->display->display_options['fields']['picture']['field'] = 'picture';
/* Contextual filter: Content: Author uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'node';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'profile' => 'profile',
);

/* Display: Profile */
$handler = $view->new_display('page', 'Profile', 'page');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Profile';
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['view_mode'] = 'full';
$handler->display->display_options['row_options']['links'] = 0;
$handler->display->display_options['row_options']['comments'] = 1;
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['relationships'] = FALSE;
/* Relationship: Content: Author */
$handler->display->display_options['relationships']['uid']['id'] = 'uid';
$handler->display->display_options['relationships']['uid']['table'] = 'node';
$handler->display->display_options['relationships']['uid']['field'] = 'uid';
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
$handler->display->display_options['fields']['body']['label'] = 'About me';
$handler->display->display_options['fields']['body']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['body']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body']['alter']['external'] = 0;
$handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim'] = 0;
$handler->display->display_options['fields']['body']['alter']['html'] = 0;
$handler->display->display_options['fields']['body']['element_label_colon'] = 1;
$handler->display->display_options['fields']['body']['element_default_classes'] = 1;
$handler->display->display_options['fields']['body']['hide_empty'] = 0;
$handler->display->display_options['fields']['body']['empty_zero'] = 0;
$handler->display->display_options['fields']['body']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['body']['field_api_classes'] = 0;
/* Field: Content: Edit link */
$handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
$handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
$handler->display->display_options['fields']['edit_node']['element_label_colon'] = 1;
$handler->display->display_options['fields']['edit_node']['element_default_classes'] = 1;
$handler->display->display_options['fields']['edit_node']['hide_empty'] = 0;
$handler->display->display_options['fields']['edit_node']['empty_zero'] = 0;
$handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = 1;
$handler->display->display_options['defaults']['arguments'] = FALSE;
/* Contextual filter: Content: Author uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'node';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_action'] = 'not found';
$handler->display->display_options['arguments']['uid']['exception']['value'] = '';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['uid']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['uid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['uid']['break_phrase'] = 0;
$handler->display->display_options['arguments']['uid']['not'] = 0;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'profile' => 'profile',
);
$handler->display->display_options['path'] = 'user/%/profile';
$handler->display->display_options['menu']['type'] = 'tab';
$handler->display->display_options['menu']['title'] = 'Profile';
$handler->display->display_options['menu']['weight'] = '-5';
$handler->display->display_options['menu']['name'] = 'user-menu';
$handler->display->display_options['tab_options']['weight'] = '0';
$handler->display->display_options['tab_options']['name'] = 'user-menu';

Jan van Diepen’s picture

I'm trying to upgrade a single user profile (using content_profile module) from D6 to user entity in D7.
As suggested I installed the profile2 module, among others, before running drush -y content-migrate-fields.
All fields are migrated to D7 (not sure if profile2 is actually needed for this), but the fields are neither available on the core user entity, neither on the profile2 Main profile.

Is there anyone out there that wrote some code to actually migrate the fields to user entity and the existing field data to the appropriate users?

Michelle’s picture

Just as an FYI since I was the one that created this issue: I'm going to unfollow it. I don't need this anymore and don't need to follow the conversation. Probably no one would care but I don't want someone to assume I'm reading because I created the issue and then think I'm ignoring them.

Michelle

vinoth.3v’s picture

Any update on this?

valthebald’s picture

I hope that many people following this issue may benefit from the Grasmash article Migrate Classes: Content Profile to Profile2

fugazi’s picture

subscribe

Michsk’s picture

I am working on this a.t.m. it will not be a beautiful solution and you probably will have to tweak it for your own case. Will get back once i have something running.

Patroclas’s picture

I have been following this topic hoping for a solution, and have looked at and/or tested some of the suggested migration methods without success. I am not a coder so the solutions that require tweaking code are not really usable (although I have tried).

So this leaves me with a large D6 site that cannot be upgraded. It is probably not a huge issue while D6 is supported but as time goes on the problem could become greater. The reason for wanting to upgrade was mainly to be able to use a fully supported responsive theme and also to improve some of the issues created by Content Profile (too many tabs, users not understanding the difference between account and profile etc).

To put it gently I am disappointed. I will keep hoping that this topic comes up with a solution, but in the mean time I will probably think twice about developing another Drupal site because it seems that the geeks have left normal users like me by the wayside in their never ending pursuit of new toys.

Michsk’s picture

Dude stop whining, D7 isn't out for a long time. So just, sit back, keep your money on the bank since your using OS and wait patently for the developers to do there work once they have time. Eventually there will be an upgrade path and you know it. You just want to go fast to D7 but if you lack the funds and know-how then you just have to wait.

Michelle’s picture

"it seems that the geeks have left normal users like me by the wayside in their never ending pursuit of new toys"

That's really unfair. How about we turn that around? "it seems the people who gave me this module for free weren't able to donate more of their time to write code they didn't need for free so that I can continue using their work for free without having to contribute anything."

Yes, it sucks when a module you use isn't ported or lacks a good upgrade path. But that's part of the cost of open source. Lots of OS is free to use but that doesn't mean you don't need to invest either time or money at some points in the process. Too many people assume OS means free ride and then start complaining when the free ride comes to an end.

Michelle

Patroclas’s picture

OK - maybe I allowed my frustration to boil over.

I don't want to hijack this topic with stuff that does not help but I do have an opinion that a lot of the development effort that goes into Drupal generally (and I am certainly not ungrateful for it) does leave some of us behind, struggling to keep our sites up to date, secure and keeping pace with change. It's just that I feel that the situation is not always understood within the wider Drupal community.

I give back as much as I can on d.o (you can see that from my posts) and I do appreciate the help and support that is shared. But having been a fan of Drupal and OS for some years, I do now find myself reluctant to start another project - which is perhaps what is causing some of my frustration.

I would prefer not to keep on about this here - maybe another topic elsewhere would be a better place.

Apologies if I have upset anyone.

q0rban’s picture

If anyone is interested, I've created a drush Content Profile migration command to migrate the data over to Drupal 7 User fields and Profile Lite categories. It is a part of the Profile Lite module and requires the Content Migrate module that is a part of the CCK module, and the Field Tools module.

vinoth.3v’s picture

@q0rban
Great :)

freelock’s picture

... and here's another take at migration, content_profile to profile2. All it takes is a PHP snippet in a VBO: http://www.freelock.com/blog/john-locke/2012-08/migrating-content-profil...

Michsk’s picture

@131 that's actually what i'm leaning towards.

Anonymous’s picture

Hi John,

Your approach (#131) looks workable to me. Am I correct that the VBO script template that you have documented is non-destructive, i.e., that the pre-existing Content Profile nodes remain intact? Or would I have to use a different Profile2 entity type name than the content type name of the original nodes in order to not overwrite any data?

Sorry that I lack a grasp of the differences between entities and nodes.

Thanks in advance,

Bob

freelock’s picture

@Bob Newby yes, that snippet is non-destructive, making a copy in profile2 of a node that contains equivalent profile data. In practice, the main difference between a profile2 entity and a node entity is that there are different convenience functions for loading and saving them (node_load vs profile2_load_by_user, node_save vs profile2_save). There are entity_load and entity_save functions, but they take more arguments and aren't smart about the special properties of profiles (such as you can only have one of a type per user).

Because profile2 is a different entity, its data is stored in entirely different tables, and so you can use the same machine name for the type (the 'bundle').

Anonymous’s picture

Thanks, John. Very helpful.

Rosamunda’s picture

Hello there,
After reading this thread, I must confess that I´m a little more clueless than before. Maybe because I´m not a developer (It´s very frustrating to be unable to help out with a technical solution).

Anyway, after reading it I would like to express an opinion:

Is there a way to programatically just copy all data inside a core profile field (the ones that are listed under admin/config/people/profile) into these new fields provided by profile2 (the ones that are listed under admin/structure/profiles/manage/{your-profile-nodetype-name}/fields)?

I have a D6 site that I´ve converted to D7. I have profile module to handle old core profile fields.
When I installed profile2 module, it automatically created the main profile for each user.
What if I create new fields with the same name that my core profile fields in admin/structure/profiles/manage/main/fields, and then copy the content from old_field_A to new_field_A?
Could that be able to be done programatically?

Maybe what I´m suggesting isn´t possible, or isn´t a viable solution somehow, because it does seem like an easy way to do it...

DamienMcKenna’s picture

I have a sandbox where I'm working on Drush commands for converting from Content Profile to Profile2: http://drupal.org/sandbox/damienmckenna/1858528

thedavidmeister’s picture

@Patroclas - You're right, this is not the place to vent your frustrations. Using words like "toys" to describe API changes that have been discussed at great length by many people far more technically competent than yourself is dismissive and straight up offensive. As a "non coder" you probably have no idea what the API changes from D6 to D7 even are, or why they were made, let alone how much work is involved in providing an upgrade path for every arbitrary piece of functionality provided by contrib modules through a paradigm shift that spanned multiple years. Please try to remain respectful as nobody here owes you a damn thing and the way you are presenting yourself doesn't exactly endear others to help you in their own free time.

A lot of the time improvements are made to *make life easier for people who can't write code* so this sense of entitlement and indignancy is unwarranted. You haven't even given us details of what wasn't working for you, just "I tried code and it didn't work" - did you see errors? were parts of your database not quite right? did you see nothing at all? fatal errors? what code did you even try? screenshots? what is your server environment like? what field types failed to migrate?

You claim that you've made decent contributions to d.o. but you don't know how to roll a patch or even provide a decent, detailed bug report when you're finding things a little difficult :/

Take a deep breath and give us more details of the problems you're having. Your d6 site isn't "stuck", you just haven't figured out what you need to do with your database yet. If all else fails the d.o. marketplace is full of companies providing services to help migrate your data for you.

@Rosamunda - #131 is basically exactly what you're asking for IIRC.

Anonymous’s picture

See #131, above. It works.

DamienMcKenna’s picture

I promoted my sandbox to a full project: http://drupal.org/project/cp2p2

mwadi’s picture

#131 Thank you.

vinoth.3v’s picture

@ DamienMcKenna
Thank you very much.

DamienMcKenna’s picture

FYI it appears that our (Mediacurrent) client's project is not going to need multiple profile types after all, so I'll be updating CP2P2 to also just convert the fields to regular user fields, stay tuned :)

Anonymous’s picture

Damien,

Personally I fail to see the point of that approach. As it stands today a D6 Content Profile node type named "type A" is simply converted to a D7 node type named, of course, "type A". Why would you assume that all people using the D6 CP module would like to stuff all their data into the user entity? Indeed, if it doesn't work to use the D7 node type as is, don't you think a developer would want to keep her options open -- e.g., in order to port the data from "type A" nodes to first-class "type A" Profile 2 entities?

Or perhaps I misunderstand what you have in mind. Always a strong possibility :)

Bob

DamienMcKenna’s picture

@Bob: If you have multiple Content Profile content types then clearly Profile2 is the better option, but if you only have one Content Profile content type then copying the fields to the main User entity is a perfectly reasonable approach.

DamienMcKenna’s picture

@Bob: Just to mention it, the vast majority of sites I used Content Profile for on D6 only had one content type, so Profile2 is overkill.

Anonymous’s picture

@Damien

Profile2 is overkill? Not IMHO.

Even if there is only one Profile2 type in place, its presence provides a natural separation in the account editing UI of what can be considered account data proper from what can be considered "personal profile" data. This alone makes the UI more self-evident for the account holder.

Moreover, the ability to have multiple Profile2 types allows the site builder to separate different classes of "personal profile" data. This separation is typically motivated by visibility-of-data concerns -- for example the desire to make certain data publicly visible and other data visible solely to other account holders. Another such concern is to have a natural place where the site admin can record private unstructured notes about a given user, such as a user who appears to be going rogue or a user who has been especially helpful to others on the site.

To motivate design based on "majority opinion" -- i.e., what is the most common use case? -- does not equate with the best design. Said approach ignores alternate use cases which, although less common, are nonetheless of importance for a healthy percentage of sites.

My 2 cents :)

Best regards,

Bob

DamienMcKenna’s picture

@Bob: You may have missed the word "also" in comment #143 - I'm not *removing* functionality from CP2P2, I'm *adding* functionality.

thedavidmeister’s picture

Much appreciated Damien. I'm taking the approach of moving user profiles to core for a project I'm working on upgrading.

Anonymous’s picture

@Damien: Yes, I did miss "also". Oops. Sorry. Thanks for your work on this, as always.

DamienMcKenna’s picture

@Bob: No worries :)

Rosamunda’s picture

Hi there,
After reading all this I don´t understand: Is this about "content profile path" or "core profile path"? Because the issue´s title says content profile, but all the big talk is about core profiles.
The thing is that I have nodetypes of type: "Profile", and after installingt profile 2, I have this "main" profile, wich is inexplicably empty.
Why? And how may I put into profile 2 all the information that I already have in my Profile content type?
Thanks!
Rosamunda

DamienMcKenna’s picture

@Rosamunda: My CP2P2 module converts Content Profile nodes to both Profile2 profiles and core user fields :) While it isn't quite ready for a 1.0 release, it's really quite close.

Rosamunda’s picture

Thanks Damien!!!
It´s terrific, just what I was looking for!
Thank you very much!

bijumon.ta’s picture

Is is possible to register user based on profile fields. I need 3 user registration with different fields and different roles.
Regards,
Bijumon

DamienMcKenna’s picture

@bijumon.ta: This isn't the correct place to ask support questions, but yes, that is possible using the Profile2 module and some extras.

subz’s picture

subscribing

klonos’s picture

Hey Subhas, welcome to Drupal! You don't need to post comments in order to subscribe - simply use the green "Follow" button available at the top-right of each issue page. This keeps the issue clean of "subscribe" comments ;)

PS: now that you have posted a comment, this button has changed to a "Unfollow" gray one.

freelylw’s picture

Issue summary: View changes

There are 2 questions from my situation

1: I have got several thousands user profile in my d6 by using the content profile, since they are all "node", they all have their own url which has been recorded in google, I get lots traffic by these url from google. If I find a way to upgrade the content profile to profile2, because the profile2 isn't the "node" , things just changed completely, will I lost all these url in google?

2: Because content profile is node, I can easily show some of the fields in the views to make some block, the question is whether the profile2 is the same ?

I am looking forward for the answer of these questions , Thank you.

DamienMcKenna’s picture

@freelylw: 1. you'd have to build something for that, e.g. using Panels. 2. Yes, you can build a view using data from Profile2.

freelylw’s picture

Thanks #160

Since the D7 and profile2 is there for very long time, I don't know whether I am looks like a strange person still asking about this.

Is there any solid way to upgrade the content profile to profile2 today already ? since I have got thousands content profile users in my D6, until there is way there, I have no other way to upgrade to D7. Thanks

DamienMcKenna’s picture

@freelylw: Please check out my Content Profile Converter project, it works pretty well, though there are a few outstanding issues (check the issue queue).

freelylw’s picture

#162, thanks for sharing, but the links is working, showing"Page not found" here

DamienMcKenna’s picture

Issue summary: View changes

I updated the issue summary to note the converter module.

DamienMcKenna’s picture

@freelylw: Sorry, I made a mistake in copy/pasting the URL. The project is https://drupal.org/project/cp2p2.

drupalfan2’s picture

Hello,

how can I use Profile2 in Drupal 7 in a way it replaces the module "Content Profile" of Drupal 6???

I need a solution für Node-Profiles in Drupal 7 similar/identical to "Content Profile" in Drupal 6.
Some profile fields should be filled at user registriation and user profile must be a node!

Can you help me? It's urgent.

DamienMcKenna’s picture

@DrupalFan2: There is no way currently to add a content type to work in D7 the same as Content Profile worked in D6. The Profile2 module has a new architecture that lets it show up in a registration form but it isn't a content type, it's a different type of entity.