The MU forums have moved to WordPress.org

Site Wide Tags infinite loop when creating new blog posts (10 posts)

  1. phlux0r
    Member
    Posted 15 years ago #

    I'm using WPMU 2.6.2 and Sitewide tags (SWT) 0.3.1 and whenever I try to make a new blog post from any blog, I get hundreds of posts inserted into the tags blog.

    I looked at the code and it seems to me that somehow there is an infinite loop happenening with the tags blog I updated recently from WPMU 2.6.1 and SWT 0.2. At that time the SWT plugin was working OK. Now, even when I revert to SWT 0.2 I still get an infinite loop... editing existing posts is fine.

    When I deleted all the posts from the tags blog (emptied wp_x_posts, wp_x_postmeta and all wp_x_terms* tables) the plugin worked fine again, I could insert a new post without ending up in a loop...

    Not sure what the problem could be here... anyone else have a similar problem after upgrading on an existing site?

    **** UPDATE (20 minutes later :) ****

    I just tried deleting all posts with post_status != 'publish' from the tags blog and lo & behold, it works fine again... fingers crossed it stays that way...

  2. phlux0r
    Member
    Posted 15 years ago #

    Bummer! still having problems... I may need to try to work with an empty tags blog as I'm still having problems...

  3. VentureMaker
    Member
    Posted 15 years ago #

    I had such a problem and obandoned SWT after it :)

  4. dsader
    Member
    Posted 15 years ago #

    You'll find comments/fixes/suggestions at the plugin page:
    http://ocaoimh.ie/2008/07/19/sitewide-tags-pages-for-wordpress-mu/
    and
    http://ocaoimh.ie/2008/10/01/wordpress-mu-sitewide-tags-pages-031/

    You may get a response there from Donncha.

    Your description of the problem matches other descriptions, but your environment for the plugin may be an issue as the problem is not widespread - in new versions. A better description of your environment may help track down a solution.

  5. phlux0r
    Member
    Posted 15 years ago #

    dsader, thanks for your pointers.

    It's very strange. On my local set-up (LAMP) I run PHP 5.2.4 and the tags plugin seems to work OK when I start with a blank tags blog. However, on my production set-up which is on a VPS with Futurehosting I run PHP 5.2.6 and even with a blank tags blog, I get multiple entries in it for each posted post.

    What's entered in the tags blogs post table is one correct entry for the post but then there are post revision entries and entries with a post_status of 'inherit' (which shouldn't happen).

    It appears as though the tags blog inserts a post for the post it inserted into itself as the guid for extra posts in the tag blog is:
    [original_post_blog_id].[previous_tags_blog_post_id] The post_status in both cases is 'publish'...

    I just tried disabling the revisions (edited wp-setting.php:
    $default_constants = array( 'WP_POST_REVISIONS' => false );
    and that seemed to have made a difference. I don't get duplicates or triplicates... see how that goes.

    *EDIT*

    Ok so I restored my tags blog from a backup so I can have my previous posts there and made an attempt to insert a new post in a blog but, yet again, it end up in a loop.

    Essentially, the extra posts all have GUIDS as described above.
    The good one is for example:
    12.16
    then all others are:
    12.1220
    12.1221
    12.1222
    ...and so on
    This is not good as I need this plugin to work and preferably keep my content.

  6. phlux0r
    Member
    Posted 15 years ago #

    Ok I commented out the add_post_meta(); call after the insert and now the tags plugin seems to behave as expected. Things seem to just work fine on my site after that.

    By the way, I am also using BuddyPress as far as environment goes...

  7. andrea_r
    Moderator
    Posted 15 years ago #

    that could be interfering.

  8. phlux0r
    Member
    Posted 15 years ago #

    Hm still it's strange since on my local dev setup which uses the exact same plugins, the SWT plugin seems to work OK without modification.

    I guess I should try removing plugins to see if any are indeed causing this anomaly.

  9. phlux0r
    Member
    Posted 15 years ago #

    Well I figured out what caused the problem. It's the BuddyPress Activity component. In fact, the offending code is in bp_blogs.php:
    add_action( 'publish_post', 'bp_blogs_record_post' );
    Which obviously interferes somehow with the tag blog spinning it into a neverending loop. I haven't investigated enough to see where exactly the problem is and how it could be solved but there it is.

    Commenting this line out gets rid of the dupe problems (and of course doesn't record the publish post activity for the member activity feeds - but I can live with that).

  10. Mat_
    Member
    Posted 15 years ago #

    phlux0r, i'm having the same problem.
    I'm going to post on the buddypress forum to find some help but if you have new ideas to solve it, tell me !

About this Topic