[Resolved] [Plugin: Extended Super Admins] can't delete added roles
Testing the dev version 0.4a (on a 3.1RC4 install with ONE super admin) I find that I cannot delete any roles I. It just keeps adding more…
1. Check on /wp-admin/network/settings.php?page=esa_options_page some capabilities and hit “Save and Add another”
2. After the page reloads, there is a new grey area above that one with the title “New Role” but this new area can not be folded open or close and shows only “Would you like this role to be deleted?” with a checkbox beside it.
3. Place a checkmark in that checkbox and hit “Save and Add another” again.
4. Now there are TWO of those anonymous grey beams at the top. Indistinguishable from each other and not removable…
For what it’s worth: the capabilities that I had initially checked to be removed have indeed gone for this super admin 🙂
Okay… I see why these grey bars are anonymous. I had not filled in a name. When putting a name in the name field and saving, there will be a bar with that name and it will open a pane with the settings when clicked the ones without a name cannot be opened or edited.
And still no way to delete any of them…
I suggest that an empty name field in the New Role section will result in NO new role. And renaming the button simply to the WP default “Save Changes” with maybe some warning message saying a name needs to be defined before any new role is added.
Interesting. Thanks for the feedback. I do have it set up so that it doesn’t save completely empty new roles; but you’re right that it should return an error if the role name is blank, rather than saving it without a name. Still, it’s odd that you can’t delete the empty roles. That seems to be a slightly different issue that I’ll need to investigate.
It’s not only the empty roles that I cannot delete. Also deleting a role with a name seems impossible. And each attempt will create a new role (without name) …
Or am I missing something here? I check the Delete this role box(es), then hit the Save and Add Another button…
What you’re doing should be the way it works.
When you go to the page, you should see one box at the bottom of the list that says “New Role” (and won’t have a “Delete this role” checkbox next to it); as that’s what you use to create a new role. However, you should not be getting multiple roles without names, nor should the existing role you deleted be replaced with empty roles.
I’ll be investigating this issue tomorrow or over the weekend. Thanks for your help and your feedback.
as i said, there is never any role deleted. there just keep getting more empty ones created…
maybe this is because i initially crippled the one and only super admin on this test install by limiting some of the capabilities and then saving the settings without any name?
i’ll do some testing with a new super admin…
nope, same with a clean super admin: i cannot delete any roles…
Okay. I think I’ve found the main issue. If you are using Networks for WordPress (or, presumably, WPMN) and you try to modify the Extended Super Admins settings from a network that doesn’t have that plugin activated (so, for instance, one of the new networks you created), this issue crops up.
Therefore, in order to avoid this issue, for now, my recommendation would be to only modify the Extended Super Admins settings from your original network. I’ll continue to investigate to see if I can find a better solution.
To begin with, though, you’ll probably need to remove all of the Extended Super Admins settings from the database. If you’re comfortable working with your database backend, you can search your wp_sitemeta table for any items with a meta_key of “extended_super_admins” and delete those rows. Then, visit the Extended Super Admins settings page in your original network and make the changes.
Hmm… in my case I am modifying from the main (original) network… I have already tried deleting the extended_super_admins entries from the DB to start fresh but the same thing happens all over again even if I take care to give the roles a name.
I’ll test with the plugin in /mu-plugins/ to see if that changes anything.
I think I might have found the problem. I’ve updated the development version again. If you can, please download the development version again (as mentioned before, give it about 30-60 minutes from the time I’m posting this before downloading the new version) and test it out.
When viewing the plugin in the list of plugins, I’ve added a new link to delete the Extended Super Admins settings (hopefully that will work for you), which means you shouldn’t have to modify your database manually anymore in order to start over from scratch.
I’ve also modified the user interface a little bit, hopefully making it a little more obvious how roles should be added or modified (though, more suggestions are always welcome).
I’ve modified the plugin so that, if you try to save a new role without a name, that role doesn’t get saved. Instead, you see an error message letting you know that it wasn’t saved.
Also, as I mentioned, I have hopefully fixed the issue with trying to delete roles. Thank you for continued help testing and fixing this plugin.
I’ve gone ahead and committed the 0.4a branch as the current stable version. Hopefully I’ve fixed all of the issues you were encountering. Please let me know if you come across any other issues.
I’m afraid it’s still happening. I see the difference on the settings page and I can now open entries without a name (with that + sign) but deleting is still not possible. And trying to will result in an extra new role without name being created… And I can not see a link on the plugins page to clear the settings from the DB. Only “Network Activate” or “Network Deactivate” (the other links for enabling across all mutliple networks have gone, is that correct?) …
I’m going to do a complete clean WP and plugin install to start fresh and see if that will change any thing.
UPDATE: I wiped the DB, did a clean install (upgrading to the latest WP3.1 from SVN) and only activated Extended Super Admins. I used another browser when editing the Extended Super Admin page: Google Chrome instead of Opera 11. The 100% CPU is there but only a very short time. Chrome aparently has less trouble there but sadly the problem with being unable to delete any roles and just getting more empty ones in return is still persistent…
If you want to take a look yourself, create an account on http://aufildudoux.com/wp-login.php?action=register , let me know your username and I’ll promote it to Super Admin.
Regarding the links, that seems to be indicating that the plugin isn’t detecting the plugin you’re using to create multiple networks (which I think is also what’s causing the error in deleting roles). The code I wrote should be detecting the WPMN/NWP plugin, but it seems to be failing somewhere along the way in some situations (since releasing the updated version, I’ve found the issue you describe on one of my test installations).
I’ll keep looking into all of these issues.
EDIT – I see you were posting another post while I was writing this. I’ve registered as cgrymala on the site you provided. I’ll also check out the plugin in Opera, since you indicated that’s the browser you’re using.
- The topic ‘[Resolved] [Plugin: Extended Super Admins] can't delete added roles’ is closed to new replies.