Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
aggregator.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Dec 2008 at 21:09 UTC
Updated:
20 Jun 2017 at 05:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
promesThere is a missing delete statement in function aggregator_save_category($edit).
After deleting: db_query('DELETE FROM {aggregator_category} WHERE cid = %d', $edit['cid']);
the statement: db_query('DELETE FROM {aggregator_category_feed} WHERE cid = %d', $edit['cid']);
is missing.
Comment #2
twistor commentedHere's a test that illustrates the issue.
And the fix.
Comment #3
twistor commentedOn second thought we should do the same thing for feed items.
Comment #4
promesI only can speak about the D6 implementation and my use of feeds. So my remark maybe not-valid for D8.
In D6 the table aggregator_category_item consist only of the category-id (cid) and item-id (iid). So you don't have any clue of which items belong to which feed. Or which items belong to the feed being removed from the category.
In #3 you delete all category-items of a category when one feed is deleted from a category. This will remove all category-items from other feeds in the same category as well.
In D6 I created a copy of the aggregator module for another type of feeds (I hope to publish this module later this year). There I found the bug #1. To solve the problem with the superfluous (or missing) items in aggregator_category_item I modified function media_aggregator_save_feed() to rebuild this table when deleting a feed from a category and / or adding a feed to a category.
Comment #5
twistor commented@promes, This issue is in regard to when categories are deleted, not when feeds are deleted.
In #3 I delete all category-items of a specific category when it is deleted, not when a feed is deleted.
Comment #6
promes@twistor, I overlooked you already do delete the category-items as well. This is indeed as simple as you do it. Thanks for pointing this out.
Comment #7
xjmRerolled for core/.
Comment #8
kscheirer#7: aggregator-remove-category-348815-7.patch queued for re-testing.
Comment #10
ParisLiakos commentedNo categories in d8
Comment #11
dcam commentedTagging this as a Novice issue. Anyone working on this can use #3 as a starting point for a patch. At the point that patch was written, Drupal 8 hadn't diverged from Drupal 7 very much yet. I thought #3 might even apply to 7.x, but unfortunately it doesn't. Still, you'll practically just be rerolling the patches.
Comment #12
Jill LI tested the patch from #3 in Drupal 7, and it worked correctly. However, it failed the simpletest "update feed item category".
If that's ok, please use the patch from #3 for Drupal 7.
Comment #13
ottlik commentedDownloaded patches from comment #3 by twistor.
Following https://www.drupal.org/patch/reroll step 3, I moved to drupal/core in 8.0.x branch and ran
"git apply --check aggregator-remove-category-from-feed-348815-3.patch", then
"git apply --check aggregator-remove-category-from-feed-348815-3.patch".
I received no output, suggesting that there is no longer a need for re-roll.
Comment #14
ottlik commentedCorrection: Second command was
" git apply --check aggregator-remove-category-from-feed-test-348815-3.patch"
Comment #15
dcam commented@ottlik
The changes introduced in #3 need to be applied to D7. Aggregator categories no longer exist in D8.
Comment #16
stefan.r commentedTagging Novice for the reroll and issue summary update
Comment #17
danylevskyiWe are on DrupalCon Dublin and we are going to work on this issue.
Comment #18
billywardrop commentedI am now working on this at DrupalCon
Comment #19
aerozeppelin commentedRe rolled patch from #7.
Comment #21
nileema.jadhav commentedApplied 348815-19.patch, it is working as expected in latest 7.x branch.
Comment #22
nileema.jadhav commentedComment #23
David_Rothstein commentedCommitted to 7.x - thanks!
I fixed a number of small problems on commit: