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=)

CommentFileSizeAuthor
#1 lt_redirect.patch2.45 KBhunmonk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hunmonk’s picture

Status: Active » Needs review
FileSize
2.45 KB

the 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.

hunmonk’s picture

Title: preserve title after login with auto_nodetitle » preserve query string logintoboggan_destination()

better title

hunmonk’s picture

Status: Needs review » Fixed

well i went ahead and tested this myself. seems fine, so applied to 5.x and 6.x

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.