I got a Access denied page when I click my account > edit. Here is the steps.
1.login website with Remember me.
2.close browser (Firefox or Chrome).
3.Reopen browser and go the website.
4.I do not have log in again. That's great ^.^
5.Click "My Account".
6.Click "Edit" my account.
7.verify username and password message show up and I inputted the right username and password before I click login.
8.Access denied page show up.
BTW, if I disable multilanguage (set Language negotiation as "None") and set English as default, there's no problem again.
Thank you very much for your kindly help.
Thomas Fan
Comments
Comment #1
markus_petrux commentedIn step 7, when you're requested to enter the password to edit your account, how do the URL looks?
Without language negotiation, it should be something like
user/login?destination=user%2Fxxxx%2Fedit(where xxxx is the user ID). How does it look when language negotiation is enabled in your environment?Also, how is the URL to edit your account? Without language negotiation, it should be something like
user/xxxx/edit. How does it look when language negotiation is enabled in your environment?Comment #2
markus_petrux commentedComment #3
thomasfan commentedHere's my environment.
1.Enabled language: Chinese, Traditional(Path prefix: zh-hant) and English(Path prefix: en)
2.Language negotiation = Path prefix only.
3.Default language = Chinese, Traditional.
4.Edit account URL = "user%2F3%2Fedit"
5.Switch to English, edit account URL = "en/user/3/edit" and message "This page does not redirect correctly" shows.
Comment #4
markus_petrux commentedOk, I can see where the problem is. It is _persistent_login_match() invoked from persistent_login_init() that's still coded for D5. This piece of code needs to be rewritten to account for the language enhancements introduced in D6.
I will when I have the time. Probably later today or tomorrow as I would like to provide a stable release for PL in the short time, and that will happen when the queue is empty. We're getting closer... :)
Comment #5
thomasfan commentedWow, replay so soon.
This modules really useful and I'm going to introduce this module in my new Chinese Drupal book.
Thanks again. ^_^
Best Regards,
Thomas Fan
Comment #6
markus_petrux commentedWell, the problem I described in #4 is a different issue. That could be fixed in order to support path aliases when checking for secured pages (defined in PL settings).
The problem here ended up being related to another thing... PL needs to avoid user/login and logout paths during hook_boot() where it check the PL cookie. When language negotiation is enabled with a path prefix, then those URLs may look XX/user/login or XX/logout, where XX is the language prefix. The problem is that during hook_boot(), Drupal has not already normalized the path in $_GET['q'], so PL needs to take care of language negotiation itself when filtering for these paths. Otherwise, PL will enter a redirection loop that ends up being detected by the browser and it shows a WSOD with an error similar to "This page does not redirect correctly", as described in #3.
I just committed a fix for this to CVS. The patch can be downloaded from here. Also, it should be available when the next development tarball is rebuilt, probably during the next few hours, or tomorrow.
I'm setting the issue as fixed. Pleas, re-open if the problem persists. Thanks
Comment #7
thomasfan commentedHi Markus,
The access denied problem persists, after updated. Please let me describe again.
environment
1.Enabled language: Chinese, Traditional(Path prefix: zh-hant) and English(Path prefix: en)
2.Language negotiation = Path prefix only.
3.Default language = Chinese, Traditional.
4.Drupal 6.11
steps
1.Login with "Remember me" checked.
2.Click My Account(我的帳號), URL = user/3
3.Click Edit, URL = user/login?destination=user/3/edit
4.Input password then "Access denied".
5.Directly change to English from block.
6.Click My account, URL = en/user/3
7.Click Edit, URL = en/user/login?destination=user/3/edit
8.Input password and Log in successed.
Please check again, thanks a lot.
Comment #8
markus_petrux commentedCould you please, check if you get any page not found error during the login process?
I suspect a page not found error is breaking the session data PL uses to control the state of the re-login process.
If you get a page not found related to a .js file in the files/languages directory, then we need to find a way to trigger a refresh of these files, maybe editing a language string from the translate interface or something similar.
You may want to look at #338630: Locale is unable to rebuild lost Javascript translation files
Comment #9
thomasfan commentedNo, I didn't get any page not found, and had no any .js files related error message, either.
BTW, I ran this module test on a pure drupal site, means I did not install any contributed module.
Comment #10
markus_petrux commentedI just tested a similar environment, but using Spanish (rather than Traditional Chinese) as my default language. It failed when a file not found error ocurred during the login verification page. It worked as soon as I fixed the missing file.
Another way to fix the problem of the missing .js file was disabling javascript. In that case the browser did not made the file not found request, so it worked with javascript disabled. Maybe you could try disabling javascript and see what happens.
I'm not sure where else to look...
One question: did you have PL installed and working before and the problem started when you upgraded to latest beta or you have started trying PL with latest directly?
Another question: If you look at Administer -> Site administration -> Performance, do you see a message in red that tells "The following enabled modules are incompatible with aggressive mode caching and will not function properly...". Which modules do you see there? Also, do you have caching enabled, page compression, etc in that page?
Comment #11
thomasfan commented1.Install latest beta at beginning, and Uninstall the beta one then reinstall with lastest dev version.
2.in red that tells"The following enabled modules are incompatible with aggressive mode caching and will not function properly: persistent_login, statistics, throttle."
3.Caching mode: disable, Page compression:Enable, Block cache: disable, Optimize JavaScript files: disable.
Actually, I don't know what's going on? Becuase I rebuild a new drupal site on localhost and there's no any problem.
Thanks for your help, anyway. :)