Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
user.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2007 at 17:01 UTC
Updated:
24 Sep 2007 at 05:34 UTC
Jump to comment: Most recent file
Comments
Comment #1
beginner commentedUpgrading:
Offering a user to log-in in a situation where the login will automatically fail can safely be considered a bug.
Also, with all the ongoing login issues being reported (esp. with IE7 with strict security settings), it would be tremendously helpful to be able to rule out the 'cookie-not-accepted' problem. It would slash down on the number of reports about login issues: see the number of people reporting successful logins, which does not take (with the online user block displaying many times the username who keeps trying to log in).
Best practice noticed on other web sites:
- If the browser doesn't accept cookies, instead of presenting a login form, the user is directed to a help-page where it is described how to (selectively) allow cookies for each major browser.
- If a browser (Konqueror) asks the user whether to accept or not a cookie, a message is presented on the web page (that cannot be loaded because the server is waiting for the accept/refuse cookie reply) saying something like: "your browser is preventing a redirect - click on this link to access the page" (seen on yahoo).
Comment #2
chx commentedthis patch is a T if I ever saw one. But the issue is sound.
Comment #3
beginner commented1) I don't know what is a 'T'.
2) the t() string must be escaped with double quotes because of the apostrophe in the string.
3) I am testing on Drupal 5 (don't have Drupal 6 set up because of mysql 4.0), but the the patch seems simple enough.
Comment #4
beginner commentedAfter having tested on D5, I get the drupal_set_message() text even though my browser DOES accept cookies. The login works, but the message is displayed nonetheless.
Comment #5
chx commentedI am not going to work on this one. menu is enough.
Comment #6
beginner commentedBelow is some instructions I found on another web site:
Can this be considered to be copyrighted?
Comment #7
chx commentedComment #8
chx commentedAnd just how this message will get to you when drupal_set_message uses SESSION? The issue is about losing your session id...
Comment #9
beginner commentedThe last comment simply indicated that using drupal_set_message() is the wrong way to go.
It still remains a huge useability problem: many users contact us because they don't understand the cause of the problem.
On a related note, the message output by drupal_set_message() is very often missed by the users. We have more and more evidence of that, and it also causes problems. People are confused and don't know whether they have successfully posted a new post (invisible because on the moderation queue), whether their vote has been taken into account, whether they have successfully subscribed/unsubscribed from the newsletter, etc...
All of this is displayed by drupal_set_message() but the users don't see it.
In critical functions like in the current issue (login attempt), it would be better to redirect the user to a separate page with the message. This is how most other BB and CMS handle it: I am starting to see why it is the right choice to do so.
So, for the current issue, when processing a login form, Drupal should redirect to a special page with, for content, the error message and some of the information presented in #6.
Comment #10
chx commentedOn a more general note, if you theme your drupal_set_message wrong, tough luck. We could indeed do a redirect past auth and check whether we are indeed logged in and if not then display instructions. This would add a plus page load for every login. Opinions.
Comment #11
gerhard killesreiter commented1) I'd love to see the "user doesn't accept cookies" issue fixed.
2) I believe the proposed change (extra page instead of drupal_set_message) is a too big change for now.
Comment #12
moshe weitzman commentedi don't think this issue is worth adding a new request for every login. we need a better solution, or no solution. my .02.
Comment #13
chx commentedThere is no bug here and it's not critical. We can also write code that issues a cookie for everybody --say, with a site name-- and the login submit function which is surely not the first page (at worst, second page load) a visitor gets, so the cookie should be there. This seems to be a widespread solution for teh problem. I will roll a patch during teh 'con.
Comment #14
bdragon commentedDuplicates marked:
http://drupal.org/node/2946
http://drupal.org/node/99325
Comment #15
dwwhttp://drupal.org/node/2946 should be active and this should be the dup. we always try to use the oldest issue. a pointer "there's some useful stuff in #xxxxxxx" in the original issue is a good way to direct people to something of value in a later duplicate. the only good reason to close an older issue is if the original got so confused and sidetracked by lame comments that no one can find the signal amidst all the noise and follow anything coherent. but there are hardly any comments in #2946 at all, and it's important for everyone to realize we've had this same issue for over 4 years now.
Comment #16
bdragon commentedFair enough I suppose, but is this a documented procedure?
I've always tried to determine the issue with the most relevant work put into it and dub THAT the master issue.
Comment #17
beginner commented@bdragon: I guess it's not documented anywhere.
I have seen it happen bothways,