BuddyPress settings access error in CBox

Probably an easy question but I’m new to Commons-in-a-Box and BuddyPress so hoping someone can point me in the right direction,…

I have a new install of Commons-in-a-Box and was able to get everything set up and working, add some users, make some groups and docs, etc., and excited to roll the site out to the wider world.

However, when I go back to the CBox dashboard in wordpress (logged in as super-admin) I get a “Sorry, you are not allowed to access this page.” error when trying to access/update BuddyPress settings. (I was initially able to access these during setup, not sure what would have changed to break this.) All of the links from the wordpress admin side seem to run into the same error. All the plugins are up to date and I’m using the default installation/configuration provided by Reclaim via Installatron.

Have searched various forums and the wider internet but not finding anything that seems to help.

Thanks for any suggestions!

Did you happen to change your WP username at any point? Seems like a silly question but the WP Multisite database stores actual usernames to determine which users have superadmin access and changing your username can get you locked out of the admin side of things.

good question. I don’t think I changed my wp username, at least not intentionally!

Just took a quick look and you may want to make sure you’re logged in as the superuser account since I see you also have additional user accounts you have created. Perhaps you created an admin account fo a particular site and that’s the one you’re logged into? The superadmin account is a 3 character username if that helps. If that doesn’t work I would say open a ticket and we can dig into your situation more because maybe I’m off base on the username thing.

OK, this is weird, I can access buddypress settings at this link:
But not at the link from the dashboard:
Does that explain what’s going on?

Ah, maybe that’s something specific to CBOX then and how they integrate with BP. I would post about it at https://commonsinabox.org/groups/help-support/forum/ and see if that’s expected behavior since it’s an application-specific thing.

1 Like

Thanks, will update if I learn anything from that forum!

1 Like

I have another “total novice” question, adding to this thread so as not to pollute the main forum.

Trying to tweak a buddypress configuration using line of PHP in a wp-content/plugins/bp-custom.php file, I foolishly didn’t spot that the quotes around the variable names were ‘smart quotes’ going in opposite directions, making for a nasty parsing error that seems to have broken a lot of things.

Warning : Use of undefined constant “BP_DEFAULT_COMPONENT” - assumed ‘“BP_DEFAULT_COMPONENT”’ (this will throw an Error in a future version of PHP) in [site-path]/wp-content/plugins/bp-custom.php on line 3

I’ve tried lots of things: removing the offending line, deleting the bp-custom.php file altogether, lots of reloading pages, deactivating and reactivating plugins left and right, etc., hasn’t been fixing it. When I deactivate the BuddyPress plugin the error goes away, but then so does all the CBox functionality; so that says the error is in BuddyPress. I deleted and reinstalled the BuddyPress plugin (deactivated cbox, deleted BP, reactivated cbox, updated plugins, the last step of which did the BP reinstall), still getting the identical error; so that says there is some file somewhere (in the database?) that is still storing and using the bad line of code and that I can’t figure out how to get it to unread/stop-using it.

There’s always the option of doing a fresh CBox install and starting over, but on the principle that I’m likely to break things in the future it would be good to figure out how to unbreak them without such a drastic step.

Any suggestions much appreciated!

Update: have restored from a backup in Installatron, appears to be working now, so that’s at least one approach (and a reminder for me to backup right before tinkering under the hood in the future). Any ideas about the above still most welcome.

Only thing I can think is did you have debug turned on in wp-config.php? Typically PHP would output any warnings or errors to an error_log instead of displaying it on a page. But yeah, backup restore was going to be my next recommendation :slight_smile:

1 Like