Database groups tables not found
-
Here’s a strange situation. I have a WordPress MU network and I’ve installed Groups on some but not all of the sites in the network. I’ve created a small plugin that hooks into the user_has_cap filter, looking for a capability that I’ve added to a Group.
Now, this plugin that uses the user_has_cap filter is only installed on sites that have Groups installed. But for some reason, when I install it, I get a big WSOD and the error I get is that it can’t find a bunch of groups_* tables. The kicker for me is that the failed SQL call is looking on a site that does not have either Groups or my plugin installed in the first place. I’m not certain why it would be looking there to begin with, and of course it can’t find it.
So, I *could* try just network activating Groups, so that the plugin’s tables are found on all of the sites, to avoid the error, but I’m wondering if that’s my only option.
I did note that the user that I’m checking capabilities on is also a member of the site that doesn’t have Groups installed. So, I thought that might be the issue. However, I checked it on a local WPMU, with a similar configuration, and I got no error.
Is there any reason why user_has_cap would generate a SQL statement to check on a site other than the site it’s on?
Is there a better way to do this? Is there a special version of user_has_cap that I could use through the Groups plugin itself?
- The topic ‘Database groups tables not found’ is closed to new replies.