Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
If I try to assign more than one category to a feed source (at aggregator/categories/$id/configure) and save the changes when I go back to the config page only one is selected.
So there's no way to select more than one category,
Comment | File | Size | Author |
---|---|---|---|
#5 | 865970.patch | 3.82 KB | swentel |
#3 | 865970.patch | 1.08 KB | swentel |
Comments
Comment #1
marcvangendThis is not critical, maybe not even major. See http://drupal.org/node/45111.
Comment #2
dodorama CreditAttribution: dodorama commentedI did that by mistake, I guess this is normal.
Comment #3
swentel CreditAttribution: swentel commentedCould reproduce this. It's because the query is using db_merge() but the primary key fid is the same when there are more categories selected. So the first time it will insert, second time update the existing previous record. Using db_insert fixes this and is not a problem since all categories for a feed are deleted anyway at the top of the function.
Patch attached fixes this.
Comment #4
andypostLet's add a test to predict this regression in future
Comment #5
swentel CreditAttribution: swentel commentedNow with test.
Comment #6
andypostGreat! It works! db_merge() was wrong because same feed could be in drupal & security categories at sametime.
aggregator_save_feed() actually deletes all categories if FID provided
Comment #7
Dries CreditAttribution: Dries commentedLooks good. Committed to CVS HEAD.