Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With latest code from CVS HEAD, when I choose a message type (at /admin) to filter and click the "Filter" button, I am redirected to the HOME page. Clicking on "administer" in the menu to go back to /admin works, and the filter is applied. Choose another message type... click "Filter"... back to the home page again.
-Steve
Comment | File | Size | Author |
---|---|---|---|
#16 | form_goto_get_q_0.patch | 2.59 KB | chx |
#11 | form_goto_get_q.patch | 2.86 KB | chx |
#10 | system.module_23.patch | 689 bytes | ebruts |
#4 | watchdog_form_overview_goto.patch | 342 bytes | chx |
#3 | drupal_57.patch | 1.63 KB | ebruts |
Comments
Comment #1
RayZ CreditAttribution: RayZ commentedI can confirm this behavior, also happens at /admin/logs. I believe this would be the watchdog.module, though I didn't have time to track down the source of the problem. IMHO this needs to be fixed before 4.7 release so I'm bumping it to critical.
Comment #2
ebruts CreditAttribution: ebruts commentedThis is not the related with the watchdog.module as this was introduced with this patch http://drupal.org/node/49799
The problem is in form.inc::drupal_get_form()
Here is the definition of '#redirect' for all forms.
So either remove the #redirect from system.module or change form.inc, however I've no time to investigate more deeply currentlty.
Comment #3
ebruts CreditAttribution: ebruts commentedI assigned it to me to keep track of it. IMHO there should be the possibility to use '#redirect' = ''; to redirect to the very top of a domain.
Comment #4
chx CreditAttribution: chx commentedThis one is easy to solve.
Comment #5
ebruts CreditAttribution: ebruts commentedYes sure -- but it does not solve the general problem behind it, this is just a "hack" to solve the specific problem with watchdog.
Adding new modules without defining '#redirect' or returning the redirect in _submit it will always redirect to the main page.
Comment #6
chx CreditAttribution: chx commentedwhich is just good. return FALSE if you do not want a redirect. more often you want than you don't.
Comment #7
ebruts CreditAttribution: ebruts commentedWhat I actually mean is that it will redirect to the main page rather than to the page you were at.
Submitting something on http://example.com/foo/bar without having '#redirect' defined nor returning something in the _submit hook will redirect you to http://example.com/.
But it should really return to the page you were submitting from.
Comment #8
ebruts CreditAttribution: ebruts commentedHere is another example http://drupal.org/node/50982
This patch would have fixed the above report as well without adding the "return 'admin/filters';".
Comment #9
chx CreditAttribution: chx commentedI will talk to Adrian about changing the default return to $_GET['q'] but I am not for removing the default.
Comment #10
ebruts CreditAttribution: ebruts commentedI agree, that would be the better alternative.
Reassigned to system.module
Comment #11
chx CreditAttribution: chx commentedMy friend, that's by far not enough.
Comment #12
chx CreditAttribution: chx commentedComment #13
ebruts CreditAttribution: ebruts commentedGood work.
Could you review this part, please?
As the comment is confusing me -- the return will do the opposite of the comment, won't it?
Comment #14
chx CreditAttribution: chx commentedTIAS. I mean, really, try it and you will see it works. (destination is set beforehands and request['destination'] overwrites whatever you hand to drupal_goto. if you want to experiment change that return to anything. it will just work.)
Comment #15
ebruts CreditAttribution: ebruts commentedActually I tried it (I would not review it ("Good work.") if I had not).
What I mean is not the user login block but (Sorry, I forgot to mention that)
As for my needs this is important; the login block is disabled on the productive site.
Comment #16
chx CreditAttribution: chx commentedThat's easy to mend. Please review whether the login block and the user/login page works both and the other forms I changed, too.
Comment #17
Amazon CreditAttribution: Amazon commentedTried patch.
http://localhost/~kieran/drupal/?q=user
Logged in.
Got redirected to: http://localhost/~kieran/drupal/?q=user/2
Comment #18
webchickOk. I've installed a fresh HEAD, created new user fromt scratch fine (apart from the duplicate system_update_173 but I gather there's another patch for that). Enabled every single module.
I created blogs, created comments, admin'ed comments, created taxonomies, edited the contact form, added a block, changed the theme, changed some settings pages, and even ran through an update (even though that made 10,000 errors ;)), created and edited users, logged out, and logged back in (both from user block and from the 'normal' user page). Probably some other stuff too. :P Basically I clicked on anything I could think of that was a form, and tried it to see if I got redirected. In all cases, the behaviour looked normal to me. I don't think I was ever redirected to the home page, apart from when I hit edit, then deleted a node (but that's expected behaviour).
Marking ready to commit.
Comment #19
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #20
(not verified) CreditAttribution: commented