"Source Feed" on Feed item form is not selected when you edit it.

The reason is that array_merge() is used to merge in the default value array(0 =>"") in aggregation_item_form(). The function array_merge() renumber numeric keys which leading to a series of numbers starting at zero; 0, 1, 2, 3... instead of the actual feed id:s that should be the option keys in the select form.

This means that when you edit a feed item, its feed id is not set and not saved correct, and when running cron the function checking if this feed item already exist, it can't find it because the edited feed item now is stored with fid=0 in the aggregation_item table. The result is that you get duplicates.

This code at row 870 in aggregation_item_form():
$feed_array = array_merge (array(0 => ''), $feed_array);

...should be replaced by something like this:
$feed_array = array(0 => '') + $feed_array;

Comments

whan’s picture

Thanks, orjantorang your solution has fixed the feed_items duplicate issue, but the fix is not ported to the module still.

Once again, Thank you :)