When more than one field is set to private there are errors on submit.
user warning: Duplicate entry '1' for key 1 query: INSERT INTO profile_privacy_values (fid, uid, private) VALUES (2, 1, 1) in /home/bjeavons/dev/contributions/modules/profile_privacy/profile_privacy.module on line 202.
Instead of two separate unique keys for the table profile_privacy_values this patch makes it a combined key off fid and uid.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | profile_privacy_install-282610-3.patch | 588 bytes | coltrane |
| profile_privacy_install.patch | 368 bytes | coltrane |
Comments
Comment #1
quicksketchI think we just need to make the uid and fid normal keys instead of "unique keys". Wouldn't that solve the problem? If we want to add a new key, we should write an update function for people upgrading their existing 5.x installations.
Comment #2
quicksketchComment #3
coltraneWhat do you prefer? Here's a patch that does it with just keys. Either patch works but this matches how it was done in 5, you're right.
Comment #4
quicksketchThanks, I was just wondering why the keys had been changed. I applied this second patch because it fixes the problem and keeps our database schema consistent across versions of Drupal. If adding additional keys for efficiency, we can provide an upgrade path in a separate patch. I'll release a 1.1.1 version to get out a release that works properly. Thanks for your help!
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.