I installed Content Profile, AAR & Role Profile to create two registration form for two different roles. Unfortunately when i active Profile Role all fields disappear! I did some testing to understand what creates the problem of lack of form on the registration page. I discovered that $form_state array in the function profile_role_form_user_register_alter() has NEVER post => roles. Profile Role search the actual role in roles array. What happens? In practice Auto Assign Role (or Content Profile) not write the current role in the $form_state.

CommentFileSizeAuthor
screen.png49.81 KBMaximG

Comments

guntherdevisch’s picture

Mm i think i'm having the same problem. I'm also working with Content Profile, AAR (assign from path) & Role Profile to create two registration forms, but my profile fields don't appear on my forms. I've set role permissions with Role Profile.

Is this the same problem you have MaximG? Is there any way to fix this?

Thanks,
Gunther

cyberswat’s picture

Status: Active » Closed (won't fix)

This is a bug in profile role and is needs to be in their issue queues

sjiuh’s picture

Issue tags: +fields, +User Role, +auto role

To define specific fields per role you can indeed combine the following modules:
- Core profile module to define fields etc.
- autoassignrole module to automatically define a user role depending on the URL. e.g.
user/coach/register automatically defines a user profile with the role coach.
- Profile_role the combines the two. You can define fields for specific user roles.

if the last modules don't communicate like described patch as described in:
http://drupal.org/node/431454

added the following code to the "profile_role_form_user_register_alter" function after line 77 in "profile_role.module"

if (module_exists('autoassignrole')){
   $path = drupal_get_path_alias($_GET['q']);
   $result = db_fetch_object(db_query("SELECT rid FROM {autoassignrole_page} WHERE path = '%s'", $path));
   $form_state['post']['roles'] = array($result->rid => $result->rid);	
}