When I log in from a menu callback that has a query string via the login block, the query string doesn't appear to be preserved.

Comments

geodaniel’s picture

This appears to work for me on 4.7b4. For example, f I log in from /?q=tracker then I am returned to that page.

Egon Bianchet’s picture

I can't reproduce it with the last cvs. If I log in from any administration page like admin/settings I'm sent back to that page.

Egon Bianchet’s picture

Status: Active » Closed (fixed)

I'm closing it since I can't reproduce it.

Wesley Tanaka’s picture

Title: Login block doesn't appear to preserve query string » Login block doesn't appear to preserve query string with clean urls
Status: Closed (fixed) » Active

do either of you have clean urls turned on? it might be specific to that. then again, it might be fixed.

Egon Bianchet’s picture

I can't reproduce it with and without clean urls

Wesley Tanaka’s picture

just tested this again. it is indeed still an issue.

Wesley Tanaka’s picture

in response to comment #2, try doing this:

1. turn on clean urls
2. go to a page that has a query string, say http://example.com/foo/bar?page=2
3. login from the user login block on that page.

Egon Bianchet’s picture

I tried, it works fine.

I have PHP4.4 on Apache 2, local install under a subdirectory

Wesley Tanaka’s picture

It goes back to page=2 for you?

I have
// $Id: user.module,v 1.582 2006/02/10 05:46:39 dries Exp $
PHP 4.3.10-16

Egon Bianchet’s picture

// $Id: user.module,v 1.587 2006/02/21 18:46:54 dries Exp $

It goes back to page 2.

The pager at the bottom says page 3 and the query string page 2, but that's because the first page is "node", the second "node?page=1" and so on.

Btw, after the login, the query string is escaped as %26page%3D1

Wesley Tanaka’s picture

Title: Login block doesn't appear to preserve query string with clean urls » Login block mangles query string with clean urls turned on

after upgrading, I get that behavior too.

ebruts’s picture

Component: user.module » base system

This is related to http://drupal.org/node/49375

I can't reproduce it with and without clean urls

Can you try it again with non-clean urls, please?
If you login from http://example.com/?q=node&page=2 it should redirect you to http://example.com/?q=node%26page%3D2 which is not the same as the above and it wont display the second page.

Btw, after the login, the query string is escaped as %26page%3D1

This will get fixed, too, as the related bug patch passes thru.

Wesley Tanaka’s picture

Status: Active » Fixed

Then let's consider the original bug report fixed somewhere between 1.582 and 1.587 and have http://drupal.org/node/49375 be canonical for the urlencoding issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)