public blog not created error
-
I have a test site setup with Buddypress, and because it will be for students I am using the More Privacy Options plugin by dsader so that everyone needs to login to even see the front page. I am not sure if this is the problem, but when I am logged in as admin I get the member “hasn’t created any public blogs yet.”
The More Privacy Options is set to allow members only to view the site. I’m pretty sure this setup worked with earlier versions of buddypress and I can’t see any reason it shouldn’t work with the version now. Everything is the latest trunk versions.
I have tried deleting the blog and recreating the user’s blog, and have tried creating a completely new user blog, but get the same result. The blogs are not listed under the “blog” tag, and I get the message above if I go to that user’s sidebar info.
Any help would be greatly appreciated.
-
Are you using the 2.9.1 version of that plugin jalien? I just downloaded that version from the wpmudev.org site. That’s the code I’ll be looking at.
I’ll look at that code and bp’s and see what’s going on. When you say the site is ‘members only’ what do you mean?
1) I would like my blog to be visible only to registered users from blog community
2) I would like my blog to be visible only to registered members of this blog
How is that blog configured for ‘more privacy’?
I guess it doesn’t matter what option you have selected in ‘more privacy’. bp will always think that a blog with anything other than the standard public setting is private. Exactly where and when are you getting a message you didn’t before?
If you use dsader’s plugin and choose any setting other than the first one “I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers and in public listings around this site.” then the blog becomes ‘private’ according to bp.
All other settings.
Thanks for the quick response.
I am using 2.9.1, and “registered users from blog community” on all blogs. I checked and that blog has the same settings. The site-admin options is set to “Site can be viewed by registered users of this community only.”
I am using quite a few other mu plugins as well “New Blog Defaults”, “Plugin Commander”, “Default User Role” and “WP Super Cache”. WP Super Cache is turned off, and shows the cache is empty. I can’t see how any of these could effect the privacy settings unless it is something in New Blog Defaults, but this shouldn’t affect anything, and it didn’t in the past.
I get the message when I go to the user, and click on “blog” <:http//siteurl/members/membername/blogs>. I don’t get a message when I click on the “Blog” <http://siteurl/blogs> since this is the site blog listings, but there also isn’t a listing for these blogs.
Thanks for
You’ll get a message that the user hasn’t created any public blogs when you browse to their profile and just look at their blogs. It’s correct. The don’t have any ‘public’ blogs in bp. The blog directory will never show private blogs. The blogs you have designated as ‘registered users only’ in more privacy are now private blogs. They will not show in the directory.
Right now bp’s view of privacy is black and white. It either is public or it’s not. No shades of grey there yet.
dsader’s more privacy plugin was created before bp. bp doesn’t know about this plugin. The two are completely unaware of each other. Both are behaving normally but not in concert.
Thanks for the help.
As a follow-up would it be possible to hard code the privacy check to check for the more privacy options settings rather than the regular privacy options, and which file does bp do this in? (As a note, I’m not a php programmer, but can usually figure out simple php and do some cut and paste and simple editing – so I’m willing to give it a go).
Again thanks.
I wish I could just point to one spot in the code and say “here’s where the privacy of a blog is determined” but there isn’t one. I looked through the file /mu-plugins/bp-blogs/bp-blogs-classes.php and found 1/2 dozen spots where functions are asked to return a list of blogs. They all go out and query the wpmu database and in all cases rely on wpmu’s settings for a blog being ‘public’ or not.
You are welcome to take a look for yourself in that file. An example of the problem would be the function BP_Blogs_Blog::get_all()
In that function are two SQL queries that return only public blogs by asking for results: WHERE wb.public = 1
public = 1 is the wpmu indication that this blog is ‘public’. dsader’s plugin simply changes that ‘1’ to -1, -2 or -3 in the table to indicate the ‘more privacy’ options and then looks for those values. It’s behavior is dependent on the values in that spot in the table also.
I don’t see any way to accomplish what you want without a complete rewrite of that entire class. It’s designed to *not* return results for private blogs. That’s exactly what it’s doing.
Thank you so much. I don’t think I’ll be able to do anything if you can’t but I’ll try and have a look anyway. Maybe taking out more privacy settings and trying something like your force-member-login, might work.
You have been a great help, thank you.
Just to wrap up this post. I went into /mu-plugins/bp-blogs/bp-blogs-classes.php and searched for “public”. At each instance where **public=1, I changed it to -1 so that it would recognize the setting from dsader’s More Privacy Options. This is not the most elegant solution, but it works for what I want. It prevents anyone from accessing the WPMU/BuddyPress site without logging in, and makes sure that the blogs appear as public once the users are logged in. If a user wanted to a blog could still be made private using the two other privacy options with More Privacy Options, only blog users can see the blog, and only site-admin can see the blog.
Hope this helps anyone who has similar situations. Of course it could be refined even further by adding a conditional so that public=1 becomes (public=1 || public=-1), didn’t try it, but something like this should work too.
- The topic ‘public blog not created error’ is closed to new replies.