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.
My app uses auto_nodetitle to pass the node title from a single text input form block to the node/add form page. If the user is not logged in, they are redirected to the login page with the help of LoginTobobban. Once authenticated, they are properly redirected to the node/add page. However, the previously defined title passed in the URL is lost. It'd be great if LoginTobobban preserved the entire destination INCLUDING any params (i.e. ?title=)
Comment | File | Size | Author |
---|---|---|---|
#1 | lt_redirect.patch | 2.45 KB | hunmonk |
Comments
Comment #1
hunmonk CreditAttribution: hunmonk commentedthe whole logintoboggan_destination() function needed a rewrite IMO. it now manipulates $_REQUEST['destination'] directly, which, given how drupal_access_denied() and drupal_goto() work, is the cleanest solution i think.
the request_uri() function doesn't seem to return fragments -- not really sure what to do about that. at the very least, attached patch is a cleaner implementation of the function which also handles query strings.
if somebody could please test this out in a few scenarios, with clean URLs enabled and disabled and let me know if it works ok, then i'll commit.
Comment #2
hunmonk CreditAttribution: hunmonk commentedbetter title
Comment #3
hunmonk CreditAttribution: hunmonk commentedwell i went ahead and tested this myself. seems fine, so applied to 5.x and 6.x
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.