Title: Imports Same Post every Sync
Last modified: August 30, 2016

---

# Imports Same Post every Sync

 *  Resolved [t2k](https://wordpress.org/support/users/t2k/)
 * (@t2k)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/imports-same-post-every-sync/)
 * Hello Developers,
 * I got the Problem that the Plugin always insert the same Posts again and again.
   Is this just for me or an known Problem?
 * [https://wordpress.org/plugins/facebook-fanpage-import/](https://wordpress.org/plugins/facebook-fanpage-import/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [t2k](https://wordpress.org/support/users/t2k/)
 * (@t2k)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/imports-same-post-every-sync/#post-6249025)
 * So i looked at the commits @ github and found the soloution:
 * …plugins/facebook-fanpage-import/components/import/import-stream.php
 * Line 118:
 * Old: $sql = $wpdb->prepare( “SELECT COUNT(*) FROM $wpdb->posts AS p, $wpdb->postmeta
   AS m WHERE p.ID = m.post_id AND p.post_type=’%s’ AND p.post_status = ‘publish’
   AND m.meta_key = ‘entry_id’ AND m.meta_value = ‘%s'”, $post_type, $entry->id );
   
   New: $sql = $wpdb->prepare( “SELECT COUNT(*) FROM $wpdb->posts AS p, $wpdb->postmeta
   AS m WHERE p.ID = m.post_id AND p.post_type=’%s’ AND p.post_status <> ‘trash’
   AND m.meta_key = ‘entry_id’ AND m.meta_value = ‘%s'”, $post_type, $entry->id );
 * Will be pushed with Version 1.0.0 beta 2
 * Have fun!

Viewing 1 replies (of 1 total)

The topic ‘Imports Same Post every Sync’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/facebook-fanpage-import_0e6bb0.svg)
 * [Facebook Fanpage import](https://wordpress.org/plugins/facebook-fanpage-import/)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-fanpage-import/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-fanpage-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-fanpage-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-fanpage-import/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [t2k](https://wordpress.org/support/users/t2k/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/imports-same-post-every-sync/#post-6249025)
 * Status: resolved