Hi, it would be nice if the module could integrate with profile2. I try to use field in profile2 and I got this error.
The field name, field_firstname, you've provided either does not exist or is not associated with the user entity and bundle.
Thanks.
Comments
Comment #1
sgerbino commentedI will take a look in to profile2 and see what will be involved. I'm not sure when I'll get to it, but I will update this issue.
Comment #2
Clean commentedSubscribe
Comment #3
TimelessDomain commentedthis is needed since content profile is being replaced by profile2
Comment #4
sgerbino commentedComment #5
sgerbino commentedThe 7.x-2.x-dev branch now has my initial integration with profile2. It should do everything except for tokens, which I'll get to pretty soon. Let me know of any issues, I'll post back after tokens are implemented.
Comment #6
sw3b commentedFor now it's looking good, has you mention the token are not working yet, but it's looking great, thanks ! Let us know when you are ready to test with the token.
Comment #7
sgerbino commentedOk, I just added token capability for profile2 and tested it out, seems to be working well for me. It should be live on the 7.x-2.x-dev (2011-Jul-20)+ branch once the packaging script fires.
Comment #8
sw3b commentedOk, i got this error when user tried to register.
•Notice: Undefined index: profile_ in realname_registration_user_presave() (line 94 of /home/sw3b/www/www/sites/all/modules/realname_registration/realname_registration.module).
•Notice: Undefined index: field_last_name in realname_registration_user_presave() (line 112 of /home/sw3b/www/www/sites/all/modules/realname_registration/realname_registration.module).
Also the username of the user is set to 1 and he does not use the first and last name set in profile2 has it should be. Also, I cannot use the token [user:first-name] and [user:last-name]. It give me nothing ?!?
I tried both DEV and BETA2 and have the same issue.
Comment #9
TimelessDomain commented(using 7.x-2.0-beta2)
There are no "replacement patterns" (tokens) drop-down lists to see which ones are available on http://www.example.com/admin/config/people/realname_registration
field_name_firstThe above text worked! (after checking "Use the profile2 module to store your first names.")
I tried the following tokens, but none of them worked.
- [user:profile-main:field-name-first]
- [user:profile-main:field-name-first]
- [user:first-name]
I guess you can only use the field name and not the tokens as of right now.
The following error appears for a new user after registering
In the site logs it says
New user: unset_username (test@example.com).note: i am using http://drupal.org/project/logintoboggan as well
Comment #10
sgerbino commentedTimelessDomain #9: Realname registration should provide tokens, not accept tokens. None of those tokens are available until after the registration process is over. I will modify the project page to be more clear.
Comment #11
sgerbino commentedsw3b #8: Did you re-visit the administration page after upgrading and click Save? Try that if you haven't.
If it is using profile_ as an index, that means it's missing the name of your profile instance. This gets set on the administrative form when you submit. The default profile2 should have an index like "profile_main"
Comment #12
sw3b commentedHi, yes I go to the configuration page to save settings again. How do you suggest to put field name to make it right. My profile2 machine name is "user_information" and the field in it are "field_first_name", "field_middle_name" and "field_last_name" ?!?
In realname config page I put the name of the field "field_first_name", "field_middle_name" and "field_last_name" and check "Use the profile2 module to store your first names".
Could you just give me an exemple with what I got maybe i'm missing something ?!?
Thanks for your help !
Comment #13
sgerbino commentedIt sounds like you're doing it right. The code for this shouldn't have changed if it worked for you in #6, tokens were just added.
If you disable Profile2, visit Realname registration administration page it will reset all the Realname registration system variables. Then enable Profile2 and reset the values -- that would be like a fresh start. Let me know if that works for you.
Comment #14
sw3b commentedOK I will clear all config and re-enable everything and let you know if it work !
Comment #15
sw3b commentedOK now i'm getting this error when registring !
•Notice: Undefined index: profile_ in realname_registration_user_presave() (line 86 of /home/sw3b/www/www/sites/all/modules/realname_registration/realname_registration.module).
•Notice: Undefined index: field_lastname in realname_registration_user_presave() (line 104 of /home/sw3b/www/www/sites/all/modules/realname_registration/realname_registration.module).
•User warning: Attempting to perform token replacement for token type profile2 without required data in token_tokens() (line 791 of /home/sw3b/www/www/sites/all/modules/token/token.tokens.inc).
Also the username of the account is not name correctly. It receive a number with a space if front of the number.
The information are saved in profil2 which is great.
Comment #16
sgerbino commentedOk I think Realname registration thinks your field_first_name is in profile_main when it should be profile_user_information
Comment #17
sgerbino commentedI've issued a fix that will be on the development branch. You can test it by downloading it here:
http://drupalcode.org/project/realname_registration.git/snapshot/eab144b...
Now you can provide the profile machine_name to ensure it is correct. Let me know how it goes.
Comment #18
sw3b commentedThis is really nice ! It work like a charm !!!
The last 2 comments for now I would like to add is remove, the necessary of the middle name and add field requirement for the profile2 machine name fields if check box are mark.
Excellent work and support !
Comment #19
sgerbino commentedIn response to your comments:
1. Middle name should not be required, you should be able to leave middle name field blank
2. I added the validation for machine names in profile2 when the checkboxes are marked
Thanks for the compliments, I am going to mark this as fixed. If you find any other issues please feel free to open a new issue.