Closed (fixed)
Project:
Drupal core
Version:
4.7.x-dev
Component:
aggregator.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Dec 2006 at 19:04 UTC
Updated:
26 Dec 2006 at 13:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
joshk commentedI was incorrect. It throws four errors no matter how many checkboxes.
Comment #2
joshk commentedThe error is in aggregator_page_list_submit(). It's running through each form_value and treating them all the same. Here are the form values:
The last four, of course, are the problem.
Proposed Fix:
My immediate though it just to throw in an additional conditional which checks to see if the value of the form_value is an array. It's also running unneceesary db_queries trying to "DELETE FROM {aggregator_category_item} WHERE iid = 'token'", which isn't really good.
The other option would be to make the form itself a bit smarter and have the iid values in a tree so they could be spidered alone. This is probably better as it's more friendly to future form_alters and the like.
Any thoughts?
Comment #3
joshk commentedPossible fixes:
I like the latter the best, and it doesn't seem to cause any problems. However, my first attempt to make it a tree didn't produce the desired results.
Comment #4
joshk commentedOk, I've implemented the #tree solution. I think this is best because:
This patch was made against HEAD.
Comment #5
mfredrickson commentedReviewed at TC Drupal Bug Hunt
This patch works as advertised and I agree with the solution. Wrapping the values inside of a '#tree' protects them from colliding with other elements that are form_altered in later.
+1
Comment #6
rstamm commentedPatch solves issue in Drupal 4.7.
Comment #7
Steven commentedTested and verified. Committed to HEAD.
Comment #8
killes@www.drop.org commentedapplied
Comment #9
(not verified) commented