I was experiencing an issue with my site where, after setting the default theme to one I had created, I was unable to log in as admin without going in as /user and then navigating back to admin. I couldn't find a solution on these forums although I found some people were having the same issue and had not received any solutions. eg. http://drupal.org/node/199756 and http://drupal.org/node/223722

I have managed to find out where the issue lies and thought I'd publish my findings. It seems that it was due to me disabling the log in block. I tried adding it back in but only showing it for pages starting admin/* but this didn't work. It seemed to only work if the block was included in the front page in its configuration. Unfortunately this was undesirable as I did not want a login box on my homepage. My inelegant solution was to include it in the sidebar_right region but not include that on my front page by wrapping the include in if(!$is_front). There must be a better way of doing this but at least this is a start

Comments

kitsunechan’s picture

You have to be logged in to be in /admin/*, so you won't be able to log in using that block if it's set that way. I think if you want to use that block, it needs to be visible to everyone.

Do you want the login box visible to all of your site visitors, or do you only want a few people to see it? With the sites I make, I am the only person who should be able to log in, so I always disable the login block, then I log in by adding /user/ to the site url and log in there.

I hope this helps.

septimusprime’s picture

Cheers. I only have the people who administer the content of the site logging in and was hoping to avoid them logging in to the user section and then navigating back to the admin section. Mainly because the admin section has the clean looking garland theme whereas the user section pulls through my custom theme which was not designed with the administation in mind. I'll know for the next site I do.

ericprk’s picture

Take a look at the logintoboggan module. I believe you can control where a user is redirected after logging in.