Support Forum
Here's a rather alarming issue that requires further investigation ASAP...
Recently, in my efforts to prune our WP multisite database, I deleted a user's site that was created by one of our Forums moderators. After deleting the site (not the user account) the member reported her post count in the forums had reverted to 0 and all her old posts were now attributed to "Guest" with the default avatar.
Thinking this may have had something to do with our recent database pruning efforts, I replicated the issue with the same results. Notes follow...
- User x is a member of site running SimplePress forums. In our case, this is site ID 1 since we only run forums on the main site.
- User creates a new site, and continues using forums with post count stats updating as expected.
- Super Admin deletes site created by user.
- User is no longer Forums member with all posts reassigned to guest.
- If a Moderator, user is no longer listed in Moderators group.
- User is still a member of the site at assigned level (in our case, subscriber) but is no longer a member of the Forums.
I strongly suggest any WP multisite Super Admins out there do not delete sites of members who are active in their Forums.
I also highly recommend this gets tested more thoroughly on a multisite install to confirm replication of the behavior.
Something is clearly triggering deletion of a SF membership from the forums if a site they created is deleted. This should only occur if their user account is deleted, not their site.
FYI: In our case, the user had multiple sites. The other site they created remains intact as does their membership on our main site. But their Forums usergroup and posts were adversely affected for some reason upon deletion of the one site they had created. In the case when I replicated the behavior, the user had only one site which upon deletion removed the user's Moderator status and reassigned all forum posts to Guest.
I'm happy to help test this further. What other information can I provide? Here's what i suggest...
- On a multisite install running SPF, create a test Moderator account with multiple posts.
- Use that account to create a new site.
- Log back in with Super Admin account and delete site created by that user. Do not delete the user account.
- Visit forums and notice how that user is no longer member of Moderators group and that all posts have been reassigned.
Is it just me?
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
so far, only report... more testing will be needed of course... but you seem to be running non standard multisite (guessing)... when a user registers a site, they normally only get an account on that new site.... they typically do not get a role on the main site... are you running a membership plugin or user plugin that might be giving new registered site users a role on the main site too?? wondering if that could be in the mix some how..
we dont hook into the site deletion process so the wp multisite delete hook or the remove user hook would need to be getting fired, I would think...
I can try to run some tests this weekend and see what happens... or course, it will be stock wp multisite... but should yield some info...
Visit Cruise Talk Central and Mr Papa's World
well, after some testing, it is as I expected... I wouldnt classify it as a bug, its just an artifact of the current state of sp and wp multsite integration... of course, if it affects you, its certainly a problem and unexpected... or more of just part of our desire for a more tight (and correct) integration with multisite...
but as designed and mentioned before, sp works with multisite assuming that each and every network site (and the main site) is a unique, individual, standalone forum... so when site x is created with its users and forum, it is totally unrelated to any other site in the network, including the main site... so when you (and many others) give users roles on more than their original site, there is now a sort of dependency between the sites...
with standard wp multisite, when site x is created, the user for site x only has access to site x... so when wp deletes site x, it tells us that user x was deleted or removed... fine and dandy if user x is only on site x... in this case, not true...
so yes, I can duplicate this with a plugin (or other finagling) for giving users roles on more than one site... when a site the user has access to is deleted, the wp process of removing that user causes sp to delete the user... later when that user visits the forum on the different network site, sp will see the user, notice he does not a properly configured account on the forum and will create his set up (leftover from longago wpmu bug with user creation)... so all appears fine as if the user never left... but in actually, because of the wp processing of the deleted site, sp actually deleted the user because of the wp hooks/actions...
of course, not desirable...
This really needs to be part of our full blown multisite integration that we have been talking about for a while now... where each network site does not have to be considered a totally standalone site (think how wordpress.com works with ms as its framework) with no knowledge or integration with other sites in the network...
unfortunately, that integration is not on the immediate horizon... so I will see if there is a quick fix that can be accomplished based on the hooks wp is firing during the site deletion process... perhaps the remove hook has more info so we can determine if the user is simply getting a role removed from one network site and not actually being deleted...
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
are you running a ... plugin that might be giving new registered site users a role on the main site too??
We do add all new network registrants as a user of site ID 1 at the Subscriber level. We had to do this years ago when we first integrated multisite to ensure new users would be members of the forums which only run on the main site. I don't see how this could be causing any trouble since it only fires on new user registration, not for users added via the network dashboard by a Super Admin as in my test.
we dont hook into the site deletion process so the wp multisite delete hook...
I wouldn't think so, but something clearly triggered user removal from the forums upon deletion of a site they created.Thanks for looking into it! I'm interested in hearing the results of any tests that delete the site of a subscriber to the main site running forums.
FYI: In both of my cases the user was subscriber to the min site and a moderator who had their Forums membership removed upon deletion of a site they created. Deletion of a site created by Super Admin did not affect forum membership nor Admin status of the Super Admin user.
Any other users out there running a multisite network with forums on the main site who want to help by trying to replicate this issue?
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
jim, think you missed my last...
Visit Cruise Talk Central and Mr Papa's World
Well that was bizarre. My long quoted reply just got eaten, even though the status pop-up said post saved...
In short, this is very unfortunate indeed. So not a bug, but a design flaw. WP not SP...
Network user x must be a member of site y to have forum access and privileges on site y. If site z (which user x created) gets deleted, user x retains all privileges (i.e.; Subscriber/Author WP role) to site y after deletion of site z, so he should also retain his forum role and stats. But something is triggering his SP removal.
Hopefully further investigation into the site removal hooks will shed light on a resolution. And I do understand this may take some time. For now, I just need to stop deleting unused sites of any members with forum activity. Unfortunately this has been an ongoing project, and is the quickest way to reduce the number of our db tables.
Thanks for investigating this issue, I'm happy to help or test patches any way I can.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
no, no, no... dont misunderstand me... not a wp issue... its definitely an sp issue... an issue with the way sp was originally 'hacked' to work with standalone wpmu (before it was integrated into core wp)... back then, we had a guy who knew wpmu well and he was able to 'hack' (add into our core) functionality so it would work with wpmu... but it assumed an operation like wordpress.com where each and every wpmu blog (now network site) was completely distinct and separate... users were not shared between sites...
anyways, its our issue in that our original wpmu integration has never really been 'redone' to fully integrate with it... just a matter of people and time... as multisite issues have arisen, we try to fix them pending the 'real' integration effort...
this one does need to be accounted for too... its a bit tricky and I dont have a fix for it yet, but will continue to work it this weekend...
Visit Cruise Talk Central and Mr Papa's World
Thanks again, please let me know if there's anything I can do to help.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
working it... may have something for you to try this weekend.... quite tricky, the fix is...
Visit Cruise Talk Central and Mr Papa's World
Jim, can you try out the two attached files? keep your old copies in case something goes haywire, but then just upload these two...
I currently cannot test this on a 5.3.4 system as mine are all on 5.4 at moment... dont believe there is any changes that would cause problems on 5.3.4, but be cautious...
This fixes the site deletion and removing users for me.... would like a test with your alternate configuration too...
thanks...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)