I have created two profiles: one that use 75% of the user fields and the other that uses 85% of the user fields (some are shared) making advantage of the existent fields.
Due to the lack of compatibility of Profile 2 with User Relationships module (including Private Message module), Select Avatar module, among others and my necessity of using two profiles (mostly because the sign up process) attached to two roles (defining diverse permissions), I have to search a work around to use the registration process of Profile 2 and then save the information of those fields into the default user profile.
The problem comes when I have to edit those profiles, if I use the built in edit profile option the user is going to see the 100% of the fields but if I use the Profile 2 edit page the existent fields are not loaded so the user is going to find every field empty.
Note: not to mention the errors that I get every second in the admin mode because of using all those modules together, thanks God the functionality is fine and those errors are not seeing by the users. Example: http://drupal.org/node/1536698, http://drupal.org/node/1490584 & http://drupal.org/node/1358938
Comments
Comment #1
warmth commentedGuys please help me :( I'm becoming crazy about this!
Comment #2
pwaterz commenteduse http://drupal.org/project/field_permissions
Comment #3
warmth commentedThanks for your response but how is that exactly going to help me? I don't get it mate. They are not loaded because of permissions?
Comment #4
warmth commentedSeems like the bug is gone now, maybe a problem with another module? I don't know...
Comment #5
warmth commentedThe bug is back... fields are treated like different again.
For example I created a field in my two profile types from an existent user field (field_user_lastname), I open the /user page and the profile-TYPE1/ noticing the user lastname is not displayed on the second one but on the first one.
If I try to edit the user/#/edit I can change the user lastname properly but if I try to edit it by profile-TYPE1/#/edit then the value is not loaded and if I save anything the value is displayed on the profile-TYPE1/ page as a different value than the one is saved on the /user page.
My user registration form is based on the profile 2 fields so all the user is filling there is getting saved in some ghost fields different than the ones those fields are linked to.
Please help me!
Note: all the field permissions are set to admin and author can edit, everyone can view
Comment #6
warmth commentedComment #7
jphil commentedhey perhaps I can help you with this, can you explain what you mean by:
"I created a field in my two profile types from an existent user field (field_user_lastname)" ... are you saying that you have attached a field of the above name to all users (via: admin/config/people/accounts/fields) and you're then trying to reuse this field as part of your profile2 types?
Comment #8
jphil commentedComment #9
warmth commentedFor example: I created a field called Name (real name) and then I used "Add existing field" to call this field on my two profile types. So if a user is type A or B the name is stored in the same place. However A has some fields than B doesn't and viceversa so this fields are just added to the correspondent profile type.
Later I used field permissions to set visibility and the ability to edit those fields for each type but the issue comes when I want to user Profile2 fields to register or edit a profile because anything you save on those Profile2 are stored on the connected existing fields and the content that is already on the old fields is loaded on the Profile2 fields when you try to edit using profile-TYPEAORB/UID/edit page.
Comment #10
acb commentedI can confirm this is an issue. Adding a field to a profile once profile data is in place, and then editing the profile saves the data in the database correctly; however on profile2_load($pid) the data doesn't show.
Lost on this one too.
Comment #11
pulrich commentedI'm not sure this will help but I was having a similar issue of adding new fields and then they didn't show up on the profile page after I added new data. Not only do you have to add the field but you also have to manage the display of the "profile page". For some reason, new fields that I added were automatically hidden!
My path: menu > structure > profile types > manage display > profile page
This could still be a bug but it fixed my problem.
Comment #12
warmth commentedI just decide to not use Profile 2 at the end. Too many headaches. If this get solved in the future I will consider adding support, if not I will just wait to Drupal 8.
Comment #13
Taxoman commented@warmth: have you by any chance been using the EntityCache module when you have experienced this problem? (other issues here suggest some incompatibilities with that module)
Comment #14
warmth commentedNo Taxoman, I have never used that module.
Comment #15
raulmuroc commented@Taxoman, me yes and after :
1) I used Entity Cache
2) applied the patch in #1387268: Profile2 entity cache table not created, causing PHP exceptions when saving/updating data
3) Uninstalled Entity Cache
I experienced these problems: Profile2 fields disappear at all anyway they are correctly saved in DB!! :S Is like if they do not exist to be shown. In profile type > manage fields they exist, in users edit form also the values are correctly saves but when trying to show them out through blocks, or views, or panels or whatever they are shown the other fields except those of profile2 type.
Comment #16
raulmuroc commentedFollow the step stated in comment #15 and the bug is fixed....
Or work-arounded... in which case this issue could be considered as duplicated while is being treatened at: #1387268: Profile2 entity cache table not created, causing PHP exceptions when saving/updating data
Comment #16.0
raulmuroc commentedAddition of http://drupal.org/node/1358938