WordPress.org

Ready to get started?Download WordPress

Forums

FeedWordPress
Duplicate Posts (19 posts)

  1. WilliamBooth
    Member
    Posted 11 months ago #

    I am overwhelmed. My site has many RSS news feeds on several topics, similar to AllTop.com. I am getting many duplications of the same post. For example yesterday one post from a site was duplicated 200 times! Also since I am bringing news feeds I would like the ability to have the posts automatically delete after 45 days. Meanwhile the posts just keep on adding. I am up to over 50,000 posts and counting. Does anyone have a any suggestions? I have gone through the setup for FeedWordPress, I “seem” to have everything configured correctly.

    http://wordpress.org/plugins/feedwordpress/

  2. tjmcgraw
    Member
    Posted 11 months ago #

    I am having the same issue with this plugin, though not on the primary domain for the multisite(!), which is at 3.6. It seems to be affecting only one site, and the only difference with that install is I attempted to use an .xml link which may not have been well-behaved in the first place.

    There were 39 feeds, I went through and batch-unsubbed to all - it took 15 minutes for the dashboard to come back, there were 40k posts and the feeds hadn't really unsubbed but all the original posts were gone - and now it seems to be working okay.

  3. tjmcgraw
    Member
    Posted 11 months ago #

    I use FWP on several sites, I only had problem with one. Judging by the other support threads, others also had problems but I don't believe that FWP was necessarily the culprit.

    I uninstalled FWP, upgraded the network to 3.6 and re-installed (not using a feed or two that was not very well behaved) and it's running like a champ.

    I have tried all the major rss pull plugins and FeedWordpress is the best, cleanest and most reliable. I just made a donation to the author because I want him to keep it updated, perhaps more of us should do the same?

    FYI, not mentioned in this thread is the FeedWordpress duplicate filter. Unfortunately it hasn't been updated since Feb. 2012 and when I tried to activate it WP coughed up a message that it caused a fatal error that prevented it from activating it.

  4. diodata
    Member
    Posted 11 months ago #

    I have the same problem. I have two Blogspot feeds coming into one WordPress site and FWP is duplicating them, even the posts made 2 years ago. Everything has been working fine since I installed it a couple of months ago. Not all of posts are duplicated, about 80% of them. I don't see any differences in the original source blog posts between the ones being duplicated and the ones that aren't.

    Does anyone have an idea why this could be happening? All of the FWP settings seem fine. I'm not sure what else to check.

  5. brndwgn
    Member
    Posted 11 months ago #

    This fix worked for me. In "syndicatedpost.class.php" change this :

    $guid = $this->post['guid'];
    $eguid = $wpdb->escape($this->post['guid']);
    
    $q = new WP_Query(array(
    	'fields' => '_synfresh', // id, guid, post_modified_gmt
    	'ignore_sticky_posts' => true,
    	'guid' => $guid,
    ));
    
    $old_post = NULL;
    if ($q->have_posts()) :
    	while ($q->have_posts()) : $q->the_post();
    		$old_post = $q->post;
    	endwhile;
    endif;

    To this :

    $guid = $this->post['guid'];
    $eguid = $wpdb->escape($this->post['guid']);
    
    $the_query = get_posts(array(
    	'fields' => '_synfresh', // id, guid, post_modified_gmt
    	'ignore_sticky_posts' => true,
    	'guid' => $guid
    ));
    
    $old_post = NULL;
    
    foreach( $the_query as $post ) :
    	setup_postdata($post);
    	$old_post = $post;
    endforeach;
    
    $post = $tempPost;
    setup_postdata($post);

    Also added this under global $wpdb

    global $post;
    $tempPost = $post;
  6. rfraserwebdev
    Member
    Posted 10 months ago #

    Hi BrndWgn-
    Thanks for offering this fix. But I see a few instances of global $wpdb in that file. Where exactly should those short lines of code be inserted?

  7. James
    Member
    Posted 9 months ago #

    rfraserwebdev, I believe you would add those right above where this code was placed...

    I am testing this now to see if it resolves the duplicate issues.

  8. The Geek Man
    Member
    Posted 9 months ago #

    Hi James, did this resolve the issue? I put the code in, but have not had enough new posts to really know for sure if it's fixed yet. The duplicates are 3-4 times per day for me, but not with every feed update.

  9. James
    Member
    Posted 9 months ago #

    Well... I cant say for sure just yet either... However, my symptoms were pretty bad and the last two posts seemed fine. I will test for a few more days and see. Fingers cross, but this was a good sign!

  10. The Geek Man
    Member
    Posted 9 months ago #

    Thanks, James. Fingers crossed here, too. So far, no dupe posts on my site either. I should know by morning if it worked and will be back to thank brndwgn if it did.

  11. otechwebmaster
    Member
    Posted 9 months ago #

    Hello everyone!
    Any news on the testing?
    I am also eager to try the code...

    Unfortunately I am not so comfortable with editing code,
    I am having trouble with figuring out where to insert

    global $post;
    $tempPost = $post;

    I am worried that I will f**k up something on my blog... :)

    Can anyone of you post that completes syndicatedpost.class.php file so I basically can copy and paste.... :)

  12. James
    Member
    Posted 9 months ago #

    I have had a few come in with no issues at all. I say its a go!

  13. otechwebmaster
    Member
    Posted 9 months ago #

    @James
    Okay so I tried editing and inserting the code myself...
    And the result is a minor catastrophe :)
    The Dashboard/Home is blank, when I turn off FWP, the Dashboard/Home returns to its usual state.
    Obviously I edited the code the wrong way...

    Could you please copy the complete PHP code and pasted here?

  14. The Geek Man
    Member
    Posted 9 months ago #

    Not sure if correct, but this is what I did and it seems to have helped:

    function freshness () {
    		global $wpdb;
    global $post;
    $tempPost = $post;
    
    		if ($this->filtered()) : // This should never happen.
    			FeedWordPress::critical_bug('SyndicatedPost', $this, __LINE__, __FILE__);
    		endif;
    
    		if (is_null($this->_freshness)) : // Not yet checked and cached.
    $guid = $this->post['guid'];
    $eguid = $wpdb->escape($this->post['guid']);
    
    $the_query = get_posts(array(
    	'fields' => '_synfresh', // id, guid, post_modified_gmt
    	'ignore_sticky_posts' => true,
    	'guid' => $guid
    ));
    
    $old_post = NULL;
    
    foreach( $the_query as $post ) :
    	setup_postdata($post);
    	$old_post = $post;
    endforeach;
    
    $post = $tempPost;
    setup_postdata($post);
  15. The Geek Man
    Member
    Posted 9 months ago #

    Update, just found a single duplicate of an article from a single feed. Not sure if the above is working. @James, did you put the

    global $post;
    $tempPost = $post;

    where I put mine?

  16. James
    Member
    Posted 9 months ago #

  17. The Geek Man
    Member
    Posted 9 months ago #

    Thank you, James! I'll give that a try.

  18. James
    Member
    Posted 9 months ago #

    No problem. Let me know your findings as well. Like I said, my tests showed positive results with the double posts. Thank you brndwgn for the fix.

  19. otechwebmaster
    Member
    Posted 9 months ago #

    @James
    Thanks a lot! I will try the code later this evening...

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.