Jump to content
MikeB

Unable to login as any user other then superuser

Recommended Posts

I have for a while now been trying unsuccessfully to login as another user on my development site, so I can be sure they see what I want them to and check my permissions.

I am running version from 11/2/2014 (2.5.7).

After clearing cache and cookies I can get in as superuser/admin but not as anyone with my 'manager' role.

When I try it gets into a redirect loop. 

Anyone have any ideas, or similar experience.

Tried debugging this but to no avail.

If you require more information, let me know what you need and I will get it for you.

Here is a screenshot of the permissions page for manager role.

post-2113-0-92926600-1415195895_thumb.jp

Share this post


Link to post
Share on other sites
When I try it gets into a redirect loop.

Where are you being redirected to? Is this a custom login page you created?

Share this post


Link to post
Share on other sites

No, just normal login to admin.

Here is a screenshot of 'net' tab from from firebug.

post-2113-0-91448000-1415213720_thumb.jp

I have set not redirect, no code, nothing. Just normal prosswire functionality.

Share this post


Link to post
Share on other sites

Sorry, here is the responce from firefox.

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

I have checked the server, and I see nothing wrong, like i said, i can login as 'me' superuser.

I just need to keep clearing broswer cache and cookies.

Share this post


Link to post
Share on other sites

Seems to me it has something to due with how your environment is set up. 

This problem can sometimes be caused by disabling or refusing to accept cookies

You mentioned you have to keep clearing your browser cache and cookies. What environment are you working in? Have a look here

Share this post


Link to post
Share on other sites

Thanks, but if the problem was my environment why can I login as the superuser. My environment knows nothing about that, it is internal to processwire.

I have tried everything I can think of external, and no luck so far. I am thinking maybe fingerprinting on login/session.

Something somewhere is saying, this user only on this machine or at least, redirect other users on this machine and getting the redirect wrong. Pretty sure it never did before, but if it did, then IMO that is not good for development.

By the way, link you sent is more Drupal specific, never had this issue on Drupal, but thanks anyway.

Share this post


Link to post
Share on other sites

Have you tried if you have the same problems on a clean PW 2.5.7 install? Also, if you create a new user with the same role and you try to login with a different browser (or incognito), what happens then?

Share this post


Link to post
Share on other sites

Tried new user with same role, and diffrent browsers (I always test everything on Firefox, Chrome, IE and Safari)

Just tried incognito and same results.

I had also given manager role permission to edit at the top level "Home" template, in case it was a permission issue. That should cascade down to everywhere unless excplicitly set further down the heirachy.

Only thing left to test is a blank install of 2.5.7 thats up next. Let you know how that goes soon.

Share this post


Link to post
Share on other sites

OK here is what I did.

Download new copy of 2.5.7 and install with intermediate profile.

Create a manager role and assign edit permission.

Assign manager edit on Home template.

Create new user with manager role.

Logout, then login with new user.

Viola!! It worked. So now what? Where could this be going wrong.

I wonder about the following:

Admin Theme, real dev site uses Reno

Dashboard module

No idea what else it could be, will try now and remove the dashboard module, then change admin theme, then start remove modules one by one based on relevance to the site.

Share this post


Link to post
Share on other sites

OK have tried with removing a number of modules that I have installed recently for SEO and redirects and maintenance mode and anything else that could be messing with logins.

Nothing works.

Not sure what my next steps should be now, short of starting again, rebuild the site from a clean install. Checking all the way that the manager role is useable.

Share this post


Link to post
Share on other sites

You could try to update to the latest dev version (since the latest seems to work) or downgrade to the latest stable. See what happens then.

Share this post


Link to post
Share on other sites

Finally got this fixed, however I was stupid and did 2 things at once without testing between. Just goes to prove i am really not a developer, my bad.

Any way, I removed "Dashboard" module but it left the page in place, and also the page "admin" then had no process attached, checked with my clean install and added back the ProcessHome.

I think when Dashboard is installed it changes that to ProcessDashboard but does not change back on uninstall.

I then updated to 2.5.8, and finally tested and it works, can now login to backend as anyone with manager role.

I guess to finally put this issue to bed I should role back and test if the fix was removing Dashboard module or upgrading to 2.5.8.

Please note, removing Dashboard did not create the issue in the first place, as it's removal was one of my steps to fix the issue.

Share this post


Link to post
Share on other sites

I have for sometime now been unable to login as a test user to verify what my real users will see.

I get an error telling me:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I did have this same problem a while ago, and it was seemingly fixed by updating to 2.5.8 but has subsequently returned.

I have tried removing some modules that could impact logins and sessions, testing after each one is removed but still to no avail.

Have also set sessionFingerprint and sessionChallenge to false and still no go.

I can login as superuser no problem, but as soon as I try with an account with another role I get that message.

Also once i have done that any attempt to get to admin page sends same error.

have to clear the cache/cookies and everything else to get back to normal.

Does anyone else have this probem, could someone please try and let me know. For the life of me I can not see what is causing the issue.

Share this post


Link to post
Share on other sites

Have just downloaded new version of processwire dev, then emptied cache, sessions on the database. Tried login as superuser, and get the same message.

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

Have checked and cookies are stored. See screenshot.

post-2113-0-80416700-1416583644_thumb.jp

Checked the single entry in session and here is the output.

Session|a:3:{s:5:"_user";a:2:{s:2:"id";i:41;s:2:"ts";i:1416583150;}s:27:"ProcessWireUpgrade_branches";a:2:{s:3:"dev";a:5:{s:4:"name";s:3:"dev";s:5:"title";s:11:"Development";s:6:"zipURL";s:63:"https://github.com/ryancramerdesign/ProcessWire/archive/dev.zip";s:7:"version";s:5:"2.5.8";s:10:"versionURL";s:92:"https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/dev/wire/core/ProcessWire.php";}s:6:"master";a:5:{s:4:"name";s:6:"master";s:5:"title";s:13:"Stable/Master";s:6:"zipURL";s:66:"https://github.com/ryancramerdesign/ProcessWire/archive/master.zip";s:7:"version";s:5:"2.5.3";s:10:"versionURL";s:95:"https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/master/wire/core/ProcessWire.php";}}s:7:"message";a:4:{i:0;a:2:{i:0;s:29:"mbrett5062 - Successful login";i:1;i:0;}i:1;a:2:{i:0;s:35:"Your ProcessWire core is up-to-date";i:1;i:0;}i:2;a:2:{i:0;s:27:"Your modules are up-to-date";i:1;i:0;}i:3;a:2:{i:0;s:48:"Saved cache  - ProcessWireUpgradeCheck_loginHook";i:1;i:2;}}}

As you can see it says i am succesfully logged in. But the page redirect is not working, gets caught in a loop.

Previuosly I could login as superuser, but not manager. Now I can not login at all.

Share this post


Link to post
Share on other sites

Finally got that fixed. I had downloaded and installed "AdminRestrictPageTree" and assigned to "guest" and "manager".

I assumed it would just hide the actual full tree leaving my listerpro lists of pages i want managers to be able to edit.

No idea why guest is in there as they can not access that page anyway.

Instead it rendered everyone unable to login due to a page redirect loop. I guess the issue was my own fault, I did not have a page to redirect them to, as I did not understand it was going to stop them getting to the admin page altogether.

Guess that will teach me to be sure i know what i am doing with contributed modules.

Have removed that module now after editing database to remove restricted roles and once again gaining access to the site admin.

I guess the reason I could no longer get in was due to the guest role being added to restricted users.

  • Like 4

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...