Closed (works as designed)
Project:
Drupal core
Version:
7.x-dev
Component:
cron system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Dec 2009 at 07:48 UTC
Updated:
31 Aug 2010 at 07:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
mr.baileysdrupal_get_destinationanddrupal_goto()to redirect back to the original page/form. To be consistent with the rest of core, it should probably be prefered over the REFERER if possibleComment #2
jbrown commentedI think there are many menu items where it doesn't make sense to have a default destination - they have no 'home' page.
run cron, flushing caches, disable developer modules and switch user all fit into this category.
For these sorts paths I think it is better just to call drupal_goto($_SERVER['HTTP_REFERER']). They can just call drupal_set_message() to output a response.
The 'destination' query parameter can be used to set the destination page explicitly if required.
If the menu item is fired with no referer, then Drupal sets $_SERVER['HTTP_REFERER'] to '' and drupal_goto will redirect to the front page. This makes sense for this sort of menu item.
For Drupal 8 I want to add a new menu type constant that calls drupal_goto($_SERVER['HTTP_REFERER']) when the page callback returns, so this sort of menu item is even simpler.
Comment #5
MichaelCole commentedcron_referer.patch queued for re-testing.
Comment #7
digitalpiku commentedFixed this issue , review needed.
Comment #9
digitalpiku commentedPlease re-test
Comment #10
digitalpiku commentedComment #12
digitalpiku commentedPlease review
Comment #13
digitalpiku commentedYipee, Finally It has been fixed!!
Comment #14
digitalpiku commentedPlease review
Comment #15
damien tournoud commentedThis works as designed. We don't send the user back to the referring page. If you want the user to be redirected somewhere else, use the destination parameter.