The Limit Group Creation (BuddyPress) option in Pro Sites doesn't seem to be working for me.
I have set the Limit Group Creation option in pro Site settings.
I have a user who is subscribed to my Pro level (named supporter).
But when that user visits the BP create group option on the main site, I get the message "Upgrade to Supporter to access this feature »"
When the user clicks this upgrade link they are taken to an account page for the main site (and not their subdomain site) and so get the message:
"Sorry, but you do not have permission to upgrade this site. Only the site administrator can upgrade their site.
« Choose a different site"
There are two issues here:
1 A pro user is unable to create a BP group despite the option being set and
2. the upgrade link incorrectly takes the user to attempt upgrade on main site.
The Limit Group Creation (BuddyPress) option in Pro Sites doesn't seem to be working for me.
I have set the Limit Group Creation option in pro Site settings.
I have a user who is subscribed to my Pro level (named supporter).
But when that user visits the BP create group option on the main site, I get the message "Upgrade to Supporter to access this feature »"
When the user clicks this upgrade link they are taken to an account page for the main site (and not their subdomain site) and so get the message:
"Sorry, but you do not have permission to upgrade this site. Only the site administrator can upgrade their site.
« Choose a different site"
There are two issues here:
1 A pro user is unable to create a BP group despite the option being set and
2. the upgrade link incorrectly takes the user to attempt upgrade on main site.
a prosite user created manually
a free user created manually
a prosite user created through paypal sandbox upgrade path
They all cannot create BP groups when this option is set.
And I'm not sure the upgrade issue is "not a problem". If a user on the site is viewing the main site, say for BuddyPress useage, then if he/she clicks the "Your Account" he is taken to siteurl/supporter-site/
But when he/she clicks this error message when creating a group, the link goes to supporter-site/?bid=1
But they do not own bid=1. ProSites should be directing user at this point to their own account page.
But the more serious problem is that Limiting Group creation is not working for manually or auto created users.
Sorry but attachments don't seem to be working here. There is definitely a Limit BuddyPress features in the Pro Sites settings page. And it does limit them when checked - it stops everyone using them!
7021 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
31st January 2012 (3 months ago)
#
I'll take a look at it. This is a tough one I really wanted to get rid of, as there really isn't such thing as a "pro user", only a pro site. So it gets tricky with things like, what if they don't have a blog? Then there is nothing to upgrade. And what blog should they be directed to upgrade if they are a member of multiple ones?
Either way if I fix it it's going to be a bit janky.
Yes I did wonder how the user vs site things works here. If a user has more than one site, and not all are pro, what happens then?
But somebody put the option there in the first place, and being able to control group creation seems desirable, though maybe pro sites isn't the place to do it?
7021 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
31st January 2012 (3 months ago)
#
We kind of stuck it in along time ago as a token BP support thing. Currently if a user is tied to any site that's pro (subscriber-admin) they are a pro user.
Yes I'm sure. I have a completely different browser where I have re-tested different users again. this limit option now makes no difference at all. On or Off even the user that has no site can create a group.
My own theme Xi from themeloom.com is derived from the default theme anyway. But I have now tested with the default BP theme and I get the same result.
With your fix in place all users can create a group when limit option set.
I have put original file back and it stops all users!
Neither buddypress.php module seems to be able to distinguish between pro and non pro users.
7021 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
20th February 2012 (3 months ago)
#
Ok great, so as I suspected it's the user's pro status that is your problem, not the plugin code.
A pro user is:
- a listed user with a role on at least one blog that has pro status
- cached for 24 hours, so any change in status will not show for 24 hours
If you want to refresh their cache, delete the user's associated 'psts_user' usermeta key from your db.
7021 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
21st February 2012 (3 months ago)
#
So we need to debug why is_pro_user() is not working for you. Can you run the sql manually?
SELECT * FROM wp_usermeta WHERE user_id = $user_id AND meta_key LIKE 'wp_%_capabilities';
See what blog_id's are returned, then put them into a comma sep list: SELECT COUNT(*) FROM wp_pro_sites WHERE expire > '1329846057' AND blog_ID IN ($blog_ids);
Responses (27)
Sales & Support Pro — 31st January 2012 (3 months ago) #
Hiya!
First off, all upgrades and subscriptions etc are processed through the main site so that's not a problem at all - it's the intended behaviour.
For the site in question, was the site a paid signup or did you manually apply the level?
Does the same behaviour happen with any other sites?
Thanks,
Phil
Member — 31st January 2012 (3 months ago) #
I have tried:
a prosite user created manually
a free user created manually
a prosite user created through paypal sandbox upgrade path
They all cannot create BP groups when this option is set.
And I'm not sure the upgrade issue is "not a problem". If a user on the site is viewing the main site, say for BuddyPress useage, then if he/she clicks the "Your Account" he is taken to siteurl/supporter-site/
But when he/she clicks this error message when creating a group, the link goes to supporter-site/?bid=1
But they do not own bid=1. ProSites should be directing user at this point to their own account page.
But the more serious problem is that Limiting Group creation is not working for manually or auto created users.
Sales & Support Pro — 31st January 2012 (3 months ago) #
Oh hold on, are you referring to Membership? There is no Group Creation limit in Pro Sites but there is in Membership.
Thanks
Member — 31st January 2012 (3 months ago) #
So what's this then? (see attached)
Pro Sites Settings Page
Member — 31st January 2012 (3 months ago) #
Sorry but attachments don't seem to be working here. There is definitely a Limit BuddyPress features in the Pro Sites settings page. And it does limit them when checked - it stops everyone using them!
Sales & Support Pro — 31st January 2012 (3 months ago) #
Sorry, my fault - I made the rookie mistake of not activating the add-on.
I've just been testing this in a fresh install and I am seeing the same behaviour. I have only one level and have limited group creation to Pro sites.
Extending the site manually to a Pro user does not change the inability to create groups.
Let me check with the developer on this one...
Thanks
Lead Developer — 31st January 2012 (3 months ago) #
I'll take a look at it. This is a tough one I really wanted to get rid of, as there really isn't such thing as a "pro user", only a pro site. So it gets tricky with things like, what if they don't have a blog? Then there is nothing to upgrade. And what blog should they be directed to upgrade if they are a member of multiple ones?
Either way if I fix it it's going to be a bit janky.
Member — 31st January 2012 (3 months ago) #
Yes I did wonder how the user vs site things works here. If a user has more than one site, and not all are pro, what happens then?
But somebody put the option there in the first place, and being able to control group creation seems desirable, though maybe pro sites isn't the place to do it?
Lead Developer — 31st January 2012 (3 months ago) #
We kind of stuck it in along time ago as a token BP support thing. Currently if a user is tied to any site that's pro (subscriber-admin) they are a pro user.
Lead Developer — 31st January 2012 (3 months ago) #
Can you try replacing your buddypress.php module with this one and confirm it fixes it?
Member — 1st February 2012 (3 months ago) #
No this is not working at all, now all users can create groups with the option set.
tried:
user with no site
user with pro level site
user with free site
All can create groups! No limit.
Lead Developer — 1st February 2012 (3 months ago) #
Are you sure you overwrote it, and are not logged in as superadmin? It works great for me. Testing with buddypress default theme.
Member — 1st February 2012 (3 months ago) #
Yes I'm sure. I have a completely different browser where I have re-tested different users again. this limit option now makes no difference at all. On or Off even the user that has no site can create a group.
Tried recopying file.
Old one works as before.
Lead Developer — 2nd February 2012 (3 months ago) #
What theme are you using? Can you test with BP default?
Member — 9th February 2012 (3 months ago) #
My own theme Xi from themeloom.com is derived from the default theme anyway. But I have now tested with the default BP theme and I get the same result.
With your fix in place all users can create a group when limit option set.
I have put original file back and it stops all users!
Neither buddypress.php module seems to be able to distinguish between pro and non pro users.
Anything else I can try?
Lead Developer — 9th February 2012 (3 months ago) #
Thanks, havn't forgotten about this. Kinda troublesome as it seems to work for me, will have to do more debugging.
Lead Developer — 17th February 2012 (3 months ago) #
Ok, had left some debug code in what I uploaded here.
Now fixed in 3.1 release. Thanks!
Member — 17th February 2012 (3 months ago) #
Well this helps to answer a problem I haven’t gotten around to working on.
Are saying limiting group creation should only be done with the membership plug in?
Lead Developer — 17th February 2012 (3 months ago) #
Well it's fixed in 3.1.
Member — 18th February 2012 (3 months ago) #
OK, I'll try and get round to re-testing it.
Member — 20th February 2012 (3 months ago) #
Installed 3.1 and re-tested. This still isn't working for me.
When option to limit Group creation is set - all users (pro and free) cannot create a group.
Only the super admin user can create a group when this option is set.
Lead Developer — 20th February 2012 (3 months ago) #
Can you confirm that your user is pro? Put something like this in a template file then visit that page:
Member — 20th February 2012 (3 months ago) #
A Pro level user returns 'not pro'. This user has permanent pro level status. And the new Pro Site feature that hides the checkout options is working.
A user without a site also returns 'not pro'.
A superadmin user returns 'Pro'
An admin (not super) user on my main site returns 'Pro'.
Lead Developer — 20th February 2012 (3 months ago) #
Ok great, so as I suspected it's the user's pro status that is your problem, not the plugin code.
A pro user is:
- a listed user with a role on at least one blog that has pro status
- cached for 24 hours, so any change in status will not show for 24 hours
If you want to refresh their cache, delete the user's associated 'psts_user' usermeta key from your db.
Lead Developer — 20th February 2012 (3 months ago) #
Oh, also the main site is skipped from these checks as it's always pro and in many installs every user is a subscriber on the main site.
Member — 21st February 2012 (3 months ago) #
Sorry but just not happening.
I have a pro user, which has been a pro user for months. But anyway I deleted the psts_user meta data and still is_pro_user returns false (Not a Pro).
User has its own pro level site and is set permanent in Pro Sites.
Also the psts_user data is not being recreated. Not sure if it should be or not.
Lead Developer — 21st February 2012 (3 months ago) #
So we need to debug why is_pro_user() is not working for you. Can you run the sql manually?
SELECT * FROM wp_usermeta WHERE user_id = $user_id AND meta_key LIKE 'wp_%_capabilities';See what blog_id's are returned, then put them into a comma sep list:
SELECT COUNT(*) FROM wp_pro_sites WHERE expire > '1329846057' AND blog_ID IN ($blog_ids);Become a member