Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#175 closed defect (bug) (fixed)

bp conflict with donncha's site wide tag plugin

Reported by: burtadsit Owned by: burtadsit
Milestone: Priority: major
Severity: Version:
Component: Keywords: site wide tags, donncha, blogs
Cc:

Description

I realize that there was a prev problem with the interaction of bp and donncha's site wide tag plugin. It still exists. It's not an infinite loop though.

When bp is installed it doesn't work at all. I get one post from subdomain blog into the tags blog and the rest either don't post to the tags blog or they are incomplete. Categories and tags from the originating post don't get created and the permalink is recorded to the tags blog, not the originating blog.

If I disable bp the site wide tagging works as advertised.

Attachments (1)

sitewide.patch (838 bytes) - added by burtadsit 13 years ago.
fix for sitewide recent blog posts when donncha's plugin is active

Download all attachments as: .zip

Change History (12)

#1 follow-up: @burtadsit
13 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 in reply to: ↑ 1 @burtadsit
13 years ago

Replying to burtadsit:

Well, never mind. I had problems on my dev machine with bp and donncha's plugin. Disabled the bp-blogs.php file and things worked fine with the plugin. Upload to the net and a diff server and did the same. Still had a problem. Disabled all of bp by deleting it completely and I still have a prob with the tags plugin. Won't create posts on the tags blog for subdomains. So, bp has nothing to do with it.

Weird. Never mind.

#3 @burtadsit
13 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#4 in reply to: ↑ description @burtadsit
13 years ago

Replying to burtadsit:

Here we go again. I disabled the site wide tagging plugin, killed the tags blog and reinstalled it. Recreated the tags blog and began testing without bp. Things work as they should with the tags blog. Reinstalled bp with the blogs component disabled. Everything works fine. Turned on the blogs component and ran into the infinite loop problem. I look in bp-blogs.php and see the comment and fix for donncha's plugin. I guess I'll be running without the blogs component for awhile. I have to build a site with that feature.

I reopened this ticket because there is still some problem there. Are we having fun yet?

#5 @apeatling
13 years ago

  • Milestone set to Blogs 1.0

#6 @apeatling
13 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Type set the get_site_option('tags_blog_id') as integer which should stop the infinite looping. On my test installation the tags blog seems to be working as expected.

#7 @lucahurst
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I type set the get_site_option result as indicated (I did it to all 4/5 that I found). While the plugin works better I've noticed that it's not quite working properly.

It seems like it's creating other "phantom" posts that get thrown out when you go through the loop. I did a var_dump of one and here are the contents.

object(stdClass)#194 (1) { blog_id?=> string(2) "13" }

Is there any way that someone can have a look at the functionality of this plugin again? I'm running the latest trunk versions of BP & WPMU 2.7

#8 @burtadsit
13 years ago

  • Owner set to burtadsit
  • Status changed from reopened to assigned

@burtadsit
13 years ago

fix for sitewide recent blog posts when donncha's plugin is active

#9 @burtadsit
13 years ago

Ok. I've attached a patch for bp-blogs.php which fixes the recent blog post activity with donncha's sitewide tags plugin problem. That plugin is saving the initial autosave draft of a post to the tags blog as well as the post. The 'vapor' posts are actually the posts from the tag blog that are inserted before the actual post is inserted. Those were making it into the bp_user_blogs_posts table. If you check the post id's there are two. One from the original blog and one from the tags blog. Different id sequences.

The problem comes in when bp's bp_blogs_record_post() function relies on the state of the $current_blog var. Donncha does switch_to_blog() which doesn't affect the $current_blog obj. It only affects the $wpdb->blogid. BP records the autosave draft thinking it's from the original blog. However since we aren't in Kansas anymore BP is confused and thinks this is a valid post being saved. After all we are still not recording things from the tags blog are we? Yes we are.

Changing $current_blog->blog_id to $wpdb->blogid, which is valid even when switch_to_blog() takes us to never never land and back, fixes this.

#10 @apeatling
13 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

patch applied, thanks to burtadsit.

#11 @(none)
12 years ago

  • Milestone Blogs 1.0 deleted

Milestone Blogs 1.0 deleted

Note: See TracTickets for help on using tickets.