Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using role delegation with views bulk operations wipes out all of my custom profile fields. Any thoughts?
Comments
Comment #1
Andrew Schulman CreditAttribution: Andrew Schulman commentedYow. Role Delegation integrates with VBO by declaring actions and operations that VBO finds and provides in its views. If one of those operations or actions is mishandling user objects, it could damage them I suppose.
Let me see if I can reproduce this. Meanwhile, please give a more complete description of what happened. Did this happen in a user-type view? And when you say it "wiped out" your custom profile fields, what do you mean? Did it empty the field values on the affected users, or remove the fields completely from all user profiles?
Comment #2
chales CreditAttribution: chales commentedSorry, this is a false alarm. (also sorry I didn't include more details, tired 4am frustrations)
I had a VBO view to do role management but whenever I would apply a role change to a user it would clear all of the custom profile field data. I assumed this was a bug with role_delegation.
After digging and digging it turns out another developer used a form alter to save the additional profile fields under the core reserved "Account" category. I assume this was done so they would be presented on the same form and not under different tabs during editing. The end result however is that when doing the save for the role adjustment the field data was being dropped.
Again sorry for the false alarm.
Comment #3
Andrew Schulman CreditAttribution: Andrew Schulman commentedOK, no problem. I'm just glad it wasn't RD's fault after all!
Good luck.