This only occurs in the sub-theme that I'm building. I can't login by any means other than going to site.com/?q=user

Anything else just takes me back to the main page without being logged in. I know it's something I've left out of my sub-theme. Anyone know real quick what I've done wrong?

Comments

samirnassar’s picture

Do you have clean URL's enabled? If so, have you tried http://example.com/user ?

kevinsmith’s picture

Yes, I can login that way, too, but that's just another way to get to "?q=user" is it not?

The problem is that I've clearly left something out (or mis-referenced something) in my sub-theme. Going to /admin and trying to login brings me no satisfaction.

johnalbin’s picture

I can’t think of anything that you could do in your sub-theme to cause you to not be able to login. That’s just weird.

kevinsmith’s picture

Category: support » bug

Yeah, it is weird. It's true for both the subthemes that I've built. Let me explain the scenario:

I run my subthemes as the site theme, with another stock theme as the admin theme (typically my themes look more like normal websites than drupal websites, therefore they don't allow the width necessary for most parts of the admin section).

Going to "/admin" brings up a form in which the user may login (with the admin theme), just as you'd expect. But when the form is submitted, "?destination=admin" shows up in the address bar, and you see the front page with the subtheme. The user has not been logged in, and going to "/admin" will take you back to square one. This occurs not only with the two subthemes I've built, but also with the zen-classic subtheme, and so now I'm assuming it's actually a bug rather than an error on my part. The bug is not apparent when the main Zen theme is selected as site theme.

Let me know if you need more information to help squash this bug!

johnalbin’s picture

Category: bug » support

I tried to recreate this bug using these steps:

  1. Make Zen Classic the default theme
  2. Make Garland the admin theme
  3. Log out
  4. Go to /admin and see “Access denied. You are not authorized to access this page.”
  5. The login block is enabled by default in Garland, so using the left-side login form, log in.

The login form does submit to /?destination=admin, but that simply redirects you to /admin after the login in complete. I have no login issues.

Kevin, do you get the same problem when using Garland as the default theme and Blue Marine as the admin theme? I suspect that you will still have this issue no matter what theme you are using. Are you sure cookies are enabled?

kevinsmith’s picture

No, it works when using Garland as the default theme and Blue Marine as the admin theme. It's a problem with a subtheme being selected as site theme, because like I said earlier, the bug is not apparent when the main Zen theme is selected as site theme.

For some reason, at least on my development platform (which is nearly identical to the production server I use), the login never completes. I can't figure this out at all. Is there anything I should be looking for to fix this? (I'm also willing to accept that something is wrong with my localhost setup, but I'm not sure what could be breaking the login...)

johnalbin’s picture

So what happens when you do the steps I outlined in #5?

kevinsmith’s picture

When I complete the steps in #5, the bug is still apparent. It seems to be ONLY apparent when a zen sub-theme is selected as the main theme and anything else is the admin theme. (I'm away from my computer right now, but I'll test later if it occurs when the zen sub-theme is the main theme AND the admin theme.)

johnalbin’s picture

Status: Active » Closed (fixed)
kevinsmith’s picture

Title: Can't login » Can't login when accessing /admin
Status: Closed (fixed) » Active

I've got to open this issue back up. Is no one else experiencing this? It does not occur when using any other combination of themes except for what I detailed in #6 above. Now one of the sites is deployed on a (completely different) production server, and the same thing occurs.

johnalbin’s picture

I know you are having issues when logging in from /admin, but can you log in from /user?

kevinsmith’s picture

Right, I can login from /user. That one works, but not /admin.

johnalbin’s picture

Try disabling all non-core modules and see if the issue persists.

djerboa’s picture

Hi guys!

Have been fighting the same problem for a month. Have you found any solution?

kevinsmith’s picture

to be honest with you, I've become so frustrated with the level of work required to get Drupal to just behave (and that's all before the hours of work needed to add finesse), I've just switched over to using Expression Engine. We'll see how that goes.

johnalbin’s picture

Status: Active » Closed (fixed)

I’m sorry you are having so many issues, Kevin. I’ve found Drupal to be a solid CMS.

djerboa’s picture

That's true! It's solid when you know its every little thing. But I like it anyway....
By the way, no chance for this issue to be solved somehow?

johnalbin’s picture

Mitya, I went though a lot of back and forth with Kevin. Have you tried the things I mentioned above. Were your results the same or different than his? Also, are you using Zen 0.8? Can you upgrade to 1.0-beta2?

djerboa’s picture

Hi John,

I can see you advised to disable every core module, but I'm not ready to do this for the moment. Actually right now I encounter this problem when I don't use Zen at all. It appears with my own theme as default and garland as admin theme as well. With only Garland everything is fine. I'll try to follow your advise next week and come back to you, if you don't mind. I use 1.0-beta2. Frankly I'm not sure that's a Zen bug, what do you think?

Thanks for your help.

johnalbin’s picture

I can see you advised to disable every core module

No. I didn’t. I said disable every NON-core module to see if the problem persists. This is just for troubleshooting, not a long-term solution.

And I don't think your problem is Zen related. You may get better support in the forums: http://drupal.org/forum/22

djerboa’s picture

Thanks John, I'll ask over there.