Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This is similar https://www.drupal.org/node/2302419. When you save a Profile2 profile, the user object gets passed with an empty username property and you get a duplicate entry error:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name': UPDATE {user}...
Comment | File | Size | Author |
---|---|---|---|
#2 | 2384999-2-fix_conflict_with_profile2.patch | 536 bytes | fenstrat |
Comments
Comment #1
rob.costello CreditAttribution: rob.costello commentedI'm not set up to create a proper patch, but a simple change will fix this. On line 50 of auto_username.module...
$form['account']['name']['#type'] = 'hidden';
could become...
Comment #2
fenstratYep, #1 is on the money, here it is in patch form.
Given that this totally breaks saving the user profile form with profile2 I'm upping the priority.
Comment #3
zhouhana CreditAttribution: zhouhana as a volunteer commentedIt works for me! Thank you!
Edit: Also see my comment at https://www.drupal.org/node/2661360#comment-11837562 Both patches solve my problem of not being able to save a Profile2 user profile.
Comment #4
Echofive CreditAttribution: Echofive as a volunteer commentedStill present in the 7.x-1.0-alpha2. The patch solve the issue.
Comment #5
fenstratThanks for the feedback @Echofive, any chance you could mark this as RTBC?
Comment #6
zhouhana CreditAttribution: zhouhana as a volunteer commentedComment #7
nehajyoti CreditAttribution: nehajyoti as a volunteer and at QED42 commentedThe patch looks to be fine, but seems to be outdated with the latest code to be applied. Patch is not getting applied.
Comment #8
nehajyoti CreditAttribution: nehajyoti as a volunteer and at QED42 commented