Hi, I'm using feedapi to import RSS feeds from blogs. However, sometimes blog owners create the node themselves before my cron runs (don't ask why... it just happens). Here is what happens
i) user creates his node
ii) cron runs
iii) feed gets updated and feedapi_node picks up the new item
iv) feedapi_node saves the new item... various hook_nodeapi($op='save') calls happen here after the node was created and one of them fails because the node has already been created (unique constraint on one of the fields)

The result is an incomplete and duplicate node in the database which is not good

This could be solved simply be adding a hook in feedapi_node at the end of _feedapi_node_save(), right before node_save() is issued which would call a hook_veto() and "&&" all the results to see if any module wants to veto the node creation (but not the feed item creation)

Has this been discussed ? What are your opinions ? I'll gladly submit a patch if required

Comments

PGiro’s picture

Status: Active » Closed (won't fix)

Unecessary, see http://drupal.org/project/feedapi_itemfilter I will implement what I need using this