Inside aggregator_save_category() function db_last_insert_id('aggregator', 'cid') should be db_last_insert_id('aggregator_category', 'cid')

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

Good catch. It would be great if you could look at the aggregator module tests to see why this wasn't identified by the tests. It would be great if you could re-submit this patch with some aggregator test improvements. Thanks.

mustafau’s picture

Done. First apply attached patch and run "Categorize feed item functionality" test. You will see one fail. Then apply the previous patch and run "Categorize feed item functionality" test again. You will see 0 fails.

Dries’s picture

Looks good. I would merge addCategory with its calling function. Also, the 'return $category;' seems bogus. This would be taken care of if you merged both functions.

mustafau’s picture

Dries’s picture

Status: Needs review » Fixed

Thanks mustafu! Yay for the test improvements. Committed to CVS HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mustafau’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Needs work

Needs to be fixed in 6.x too.

AlexisWilke’s picture

Cool to see that there is a fix for this one! I guess it did not make it to 6.10. At times, it just feels like you're way slow guys!

I will mark my own bug #352719: Add Category generates an SQL error (PostgreSQL) report as a duplicate of this bug.

Thank you for providing the fix!
Alexis Wilke

mustafau’s picture

Status: Needs work » Needs review
FileSize
834 bytes

Rerolling for DRUPAL-6.

brianV’s picture

Status: Needs review » Reviewed & tested by the community

Trivial change, works when I test it, RTBC

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Great, thanks, committed to Drupal 6 too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.