How does feedapi detect duplicate items?

I presume that the guid or url columns in the feedapi_note_item tables determine whether a feed item node exists.
However when I execute SELECT guid, count( guid ) FROM feedapi_node_item GROUP BY guid LIMIT 0 , 30 I get guids with counts of more than one.

I have 2 feed items with identical URLs and Code

I would have thought that on updating a new node the guid is checked before being added.
Is the guid generated by feedapi or does it come in the feed already?

On examination it turns out the feedapi_node object for both feed items are the same except for the 'arrived' value. Would that cause feedapi to consider them different?

I have looked at _feedapi_node_unique and it looks correct.

It looks like some part of the feed item creation code is missing a call to _feedapi_node_unique which I presume checks for duplicates

Funnily enough I cannot find any call to _feedapi_node_unique in any part of the source in any of the feedapi related modules.

Looking it up only returns a match in its definition

I have seen a few posts mentioning duplicates and I wonder if this is where the problem might be.

/voipfc

Comments

voipfc’s picture

Is _feedapi_node_unique called through a hook?

aron novak’s picture

See this code from feedapi.module :

if (!module_invoke($processor, 'feedapi_item', 'unique', $item, $feed->nid, $settings['processors'][$processor])) {
aron novak’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Priority: Critical » Normal
Status: Active » Fixed

Take a look on Mapper 2.x, now the deduping is overrideable by the mapper.

Status: Fixed » Closed (fixed)

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