While removing a user from a shortcut set in a module I was making, I received an error about column UID not being found. Looking in the shortcut.module I saw that shortcut_set_unassign_user was using the wrong table to remove the user from the shortcut set.
Attached patch correctly unassigns a user from the shortcut_set.
This is the first time that I'm submitting a patch to drupal core so forgive my ignorance if I'm doing this wrong.
The patch is made against drupal 7.4
Comment | File | Size | Author |
---|---|---|---|
#11 | shortcut_unassign-1228888-4778138.patch | 1.39 KB | Johnny vd Laar |
#3 | shortcut_unassign-1228888-4777606.patch | 512 bytes | Johnny vd Laar |
shortcut_unassign_bug.patch | 484 bytes | Johnny vd Laar | |
Comments
Comment #2
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedok guess it was meant to fail at first try. going to try to create a new patch hold on ;-)
Comment #3
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedok second attempt made this to latest 7.x-dev version from git and created the patch with git instead of svn
Comment #4
marcingy CreditAttribution: marcingy commentedThis needs a test. And also moving to d8.
Comment #5
marcingy CreditAttribution: marcingy commentedSetting to needs review for the bot.
Comment #6
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedah thank you I already wondered why it didn't test anymore
Comment #7
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedYay, so is there anything I'm supposed to do now?
Comment #8
marcingy CreditAttribution: marcingy commentedWe need a simpletest to test the behaviour is correct when shortcuts are deleted.
Comment #9
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedWell the function is never used by drupal core itself:
http://api.drupal.org/api/drupal/modules--shortcut--shortcut.module/func...
So will it be sufficient to add this?
Comment #10
marcingy CreditAttribution: marcingy commentedFrom a quick scan that look like it does enough - if you roll a combined patch I'll review it later :)
Comment #11
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedok great, attached a new patch that also includes the test case
Comment #12
Bojhan CreditAttribution: Bojhan commentedSubscribe, pretty stupid heh.
Comment #13
marcingy CreditAttribution: marcingy commentedLooks good.
Comment #14
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x. Thanks!