Change WordPress user roles and capabilities › Forums › Bug Reports › Can't Edit Roles via Subsite
- This topic has 16 replies, 2 voices, and was last updated 8 years, 11 months ago by farmzone.net.
-
AuthorPosts
-
15/12/2015 at 06:18 #1859farmzone.netParticipant
Hi, I have the URE Pro 4.21.
I went to go and edit the Admin Menu access for a Role in one of my subsites, but when I click on the role to edit, the page refreshes and shows the Subscriber role.
No matter what I do I cannot get it to go to a role other than the default.
16/12/2015 at 02:16 #1860VladimirKeymasterHi,
Check the browser JavaScript console for the error messages (Shift+Ctrl+J at Google Chrome).
16/12/2015 at 04:13 #1861farmzone.netParticipantNothing to report. Empty.
I did the Shift+Ctrl+J then changed the role on the User Role to Administrator editor page. Page refreshed and it was back to Subscriber role with the subscriber settings.
16/12/2015 at 04:31 #1862farmzone.netParticipantJust did some more testing to see where the problem may be.
I run a local DEV server = Works fine.
I then upload to a staging site (which is a subdomain of master site) = Works
I then upload to the Master site = BrokenIn regards to the database, it only ever comes down from master to staging or master to dev.
The ONLY difference with the Master site is CloudFlare and SSL. I have tried disabling CloudFlare to see if it is something there but was getting same results.
16/12/2015 at 04:36 #1863farmzone.netParticipantJust think I found something.
I tried testing with ClouFlare in Dev mode and using Chrome Icognito to eliminate cache issues.
The URL for the page is here: https://oranamodels.com/wp-admin/users.php?page=users-user-role-editor-pro.php
I logged in and changed the role ready to edit.
I was then asked to sign in again, but the URL this time was:
https://eangulus.com/oranamodels/wp-login.php?redirect_to=https%3A%2F%2Feangulus.com%2Foranamodels%2Fwp-admin%2Fusers.php%3Fpage%3Dusers-user-role-editor-pro.php&reauth=1I am using Multisite with Domain Mapping, I didn’t expect that page to use the eangulus.com domain.
16/12/2015 at 05:05 #1864VladimirKeymaster1) Did you try to change current role to one from the WordPress built-in set, like ‘author’?
2) What plugin do you use for the domain mapping?
At this plugin
https://wordpress.org/plugins/wordpress-mu-domain-mapping/
description I found:The login page will almost always redirect back to the blog’s original domain for login to ensure the user is logged in on the original network as well as the domain mapped one
So it seems that it’s not the real reason of a problem.
3) Could you add this line
print_r($_POST);
to the begin to of ‘editor()’ function at user-role-editor-pro/includes/class-ure-lib.php, line #252?
So it will be seen as:
public function editor() { print_r($_POST); if (!$this->editor_init0()) {
When plugin works correct you should see this output after role change:
Array ( [action] => role-change [object] => role [user_role] => test_copy [ure_nonce] => c82168f082 )16/12/2015 at 05:16 #1865farmzone.netParticipant1. Yes. I have tried. I only have 2 custom roles and have tried also changing to Editor Administrator etc.
2. Yes. That’s the plugin I use, but also found a similar issue regarding URL’s with WP Legal Pages. They had a drop list that was populating with the Network address instead of the mapped domain, which caused issues with the cookies.’
3. Done. Result: Array ( )
16/12/2015 at 05:25 #1866VladimirKeymasterThanks.
It seems some redirects took place before you get the URE’s page and it does not get needed POST parameters, similar to the initial opening.What will be if you try temporally update the available role ‘subscriber’? Turn on some uncritical capability, like ‘read_private_pages’ and click ‘Update’ button. Will you see the same ‘array()’ output?
16/12/2015 at 05:42 #1867farmzone.netParticipantSame result. I think something is happening (or not) before changing anything.
I noticed when I went to the page, human readable was off (I have it on by default), and when I tried changing it same thing happened. And never got anything in the array.
I do still think it has to do with the URL. Dev and staging both use the staging.eangulus.com/oranamodels/ format while the main has the mapped domain and redirects the sub Directory to the mapped domain.
I noted the only difference above but forgot to mention that the domain mapping has all domain info on all 3 sites, but is set as primary domain only in the master for obvious reasons.
16/12/2015 at 05:44 #1868farmzone.netParticipantWould it be easier to login for yourself? Only thing is it is a live site, but I only have access at this stage (till I get this bug fixed). And I will have to make any changes back into develop branch so I can push thru Github properly.
16/12/2015 at 06:25 #1869VladimirKeymasterThanks for the additional information.
1st, I will try to setup multisite with domain mapping locally 1st and try to catch a reason.Then I will contact you with results and may be ask you about the on-line access if needed.
17/12/2015 at 05:14 #1877VladimirKeymasterI’ve setup test instance of WordPress multisite with domain mapping locally. But it did not repeat this issue. URE works as expected from any domain (primary or mapped) in URL.
Send superadmin login credentials to [email protected]
I will look on the site settings, make some tests on-line.I suppose that moving the part of parameters responsible for the presentation, from the POST to GET (adding to URL) may resolve the issue. It depends if redirect takes place after POST data was really processed by plugin code. And it will not help if redirection occurs before POST data processing by URE plugin.
It’s not a quick fix and will require some time to refactor the code any way.
17/12/2015 at 05:29 #1878farmzone.netParticipantJust sent them then.
Also just note that only the oranamodels site us live at this stage and I am the only active user as well.
17/12/2015 at 06:01 #1879VladimirKeymasterAfter you mapped subsite to the different domain, you need to replace its “Site URL” with that domain in order to exclude extra redirections made by WordPress. Go to the ‘Network admin->Sites’, select the site and click ‘Edit’ under its row to get needed form.
I did that for https://yourgigguide.com/ site and URE started working as expected for that site. Please test.
17/12/2015 at 06:05 #1880farmzone.netParticipantIs there anything other way?
If I do that it would mean alot of extra work scanning and replacing database values to make it work with the dev and staging servers.
Also this problem wasn’t there before. This site is a rebuild and the old one I never changed the site URL ever, yet didn’t have this issue with ure.
-
AuthorPosts
- You must be logged in to reply to this topic.