The login block will not work. I input the username and password, but then it redirects me to the home page of the site and does not log in

The regular login on the /user page works just fine, it's only the block that does not work.

I should note that it did work before, and I had set up a rule that redirected the user to the home page when they log in. The rule did work for a while too, but I tried deleting it and it is not making a difference.

Thanks for any help in advance!

Comments

rszrama’s picture

Status: Active » Closed (cannot reproduce)

No clue without access to your site, but it sounds like perhaps your theme has hardcoded a login block that does not use the Forms API. I've seen this before in premium theme stores, and it could be the culprit. Guessing you sorted this out by now.

RollWhisTler’s picture

Version: 7.14 » 7.22

I have the same problem, and is not a theme hardcoded form, is the core user login block :(.

when on user/login it works great, but when using the block in other pages, it just reloads de page and no login occurs... i checked js errors on console and last log messages on the backend and no error visible :_(.

Any ideas what to check next?

thank you

ilgeorgo’s picture

Issue summary: View changes

Similar problem here, while on all pages the login block works fine, on a specific page it doesnt want to login and sends error message have you forgotten your password... which is not the case because I login with the same credentials and account name from different pages.

thanks

scottsawyer’s picture

I seem to be experiencing the same issue. I place a standard Drupal user Login Block in a region, but whenever I attempt to login, it fails. I have a ton of modules installed, several of which do things with user logins, so it's hard to narrow it down from logintoboggan to Profile2 registration path. I disabled my Rule for login redirect and don't have any others that act on login.

If I add my block to node/227, when the page reloads, it appends ?destination=node/227

Looking at the Recent Log Message, I do not see a session ever being started for the user.

The form is a standard Drupal block, I have done no customization to the form.

I have tested and I have the problem on my Dev site as well as the Production site, different servers. Works on another site just fine.

Thoughts?

lukedekker’s picture

I was experiencing something very similar. It had to do with the fact that the block was not attached to the base node, In my case, it was attached to the 403 response, but not the emptypage callback that was being displayed. When a user submits the form, Drupal tries to submit it via the emptypage node, which does not contain the form. Thus, the page is just reloaded with an appended destination parameter. To fix it, all I had to do was add the user login block to the emptypage.

Hope this helps.

divyesh19’s picture

Hi lukedekker,

Can you please let me know what exactly do you mean by an emptypage node?

Thanks in advance.

lukedekker’s picture

I was referencing the empty_pages module. Basically it just provides a blank page callback that you can then populate with blocks. I'll be honest though, I don't remember anything else about the issue I was running into back then. My memory isn't good enough to remember those sorts of details :)