I’m Getting Double Posts with the Feed to Post

To understand what might be happening, here is how the code works to prohibit a feed item being made into a post multiple times.

Each feed brings in multiple feed items.  When each feed item is brought into the plugin, the first thing the program does is see if that item has already been entered.  It does this by taking the permalink of the item (the URL) and putting into the WordPress meta_posts table.

Each feed item then is first checked to see if it’s permalink is in the meta_posts table and whether the title of the post is in the post table.  If both of these are true, the item isn’t entered again as a post.  If the permalink doesn’t exist and the title doesn’t exist, this means it has been entered yet, so it’s posted as a new post.

The cron scheduler will take care of bringing in the posts and as long as the scheduler is working well, you should have no problems.  But if you click on Click to Fetch Feeds Now at the same time the cron scheduler is firing, the ability of the plugin to check if the permalink has already been entered doesn’t work well (because WordPress need to process many things at the same time).  As a result, you may get a double post.

There are also some rare situations where the permalinks for a given feed post change and that will cause double posting problems.  But, again, these are rare and are almost always due to the feed provider doing an update and changing the permalink as a result. There is nothing this plugin can do about that.

Finally, when you delete a post, the permalink is still live as far as WordPress is concerned….so if you try to bring the post in via the plugin, the title won’t match, but the permalink is still there, so the post will not come in again. But if you delete the trash, the both the permalink is gone, the title isn’t there, so the plugin assumes the post is ok to bring in again.

Posted in: Double Posts

  • RSS Feeds