I took over a d7 page from another dev to whom I currently don't have contact. Now I'm digging through the different configurations and settings etc. trying to fix various minor issues. One of the issues is a strange behavior that prevents users from logging in in case they access a restricted node. In detail:

The website I'm working on has a restricted area "intranet" which is only accessible for logged in users. Users that are not logged in trying to access the "intranet pages" see only the login form with the message "You have to be logged in to access this page". So far so good.

But when I (not logged in) then actually enter the correct login credentials on the form that appears on those restricted nodes, I'm just getting the error message "You have to be logged in…" again, together with the login form. Logging in through the regular login page "/login" works perfectly fine.

I hope somebody knows a way around this problem? Any pointers appreciated…

1 Answer 1


A possible explanation for what is happening is that this is implemented via some custom rule, created with the Rules module (at least that's how it "could" have been implemented with a rather basic custom rule).

So if you have the Rules module enabled in your site, you may want to do some Rules debugging, as explained in my answer to "How can I display the value of a variable inside a condition?".

  • Thank you for your suggestion! I finally checked the Rules – but there is no rule concerning the login process… There is actually only one Rule in place… Commented Oct 13, 2016 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.