Closed (duplicate)
Project:
Drupal core
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2004 at 00:27 UTC
Updated:
5 Feb 2004 at 13:46 UTC
Jump to comment: Most recent file
Added as a feature request per discussion in http://drupal.org/node/view/5066. Need generic method to set and get referrer out of user's session.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | dries.referrer-session.patch | 4.35 KB | dries |
Comments
Comment #1
patman commenteddoh! put this request in the wrong category! Added per discussion in http://drupal.org/node/view/5066. Need generic method to set and get referrer out of user's session.
Comment #2
(not verified) commentedPHP provides mechanism to set and get from a session. It is the $_SESSION superglobal. I propose that this 'referer' save happen at the bottom of includes\common.inc
Comment #3
dries commentedI created a patch for this. We could use it to fix a login bug (implemented by the patch) and to redirect the user to the referring page after saving a node (implemented by the patch). In the latter, the referring page can be a user page (
node/view/nid), the overview page at the administration section (admin/node), the book outline (book/view/nid), the book administration pages (admin/node/book/nid), and so on. However, the problem with usingdrupal_goto()is that status messages are lost ...Comment #4
moshe weitzman commentedThis patch was applied, and I don't think we've made matters better. I often open multiple windows coming off of the tracker page. Then I respond to those threads which interest me. After I post my comment, I am often showed the wrong page, because my referer is wrong. According to #drupal, this is a frequent occurrence. Not just me.
I propsoe we always show the node/view or comment/view page after editing. Most authors like to see their post after submitting it. This is reassuring.
If we must have different pages afetr editing a node/comment, then let the function which calls node_form() specify a destination in a hidden field.
Comment #5
dries commentedI second that the patch is not working properly in its current state and that we need to implement and test and alternative solution.
Comment #6
gábor hojtsyI also experience strange behaviour since this patch got accepted. If the referer needs to be remembered, than it should be in a hidden form field, as it was with the user login... That should be reverted and the node module should do similar referer handling IMHO.
Comment #7
dries commentedThe patch was never committed to HEAD. I only wrote and shared it for testing purpose. The problem with using a hidden form field (like the user module's login block does now) is that it does not play nice with Drupal's cache. That is, using a hidden form is buggy.
Comment #8
gábor hojtsyDoh, if this patch was not accepted in HEAD, then I experience something else when getting redirected to various unrelated places after submitting forms... I will look into it later...
Comment #9
moshe weitzman commentedClosing this item in favor of this similar issue