Needs work
Project:
UserLoginBar
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2009 at 16:44 UTC
Updated:
17 Apr 2009 at 11:39 UTC
when a user is logged out the form action to be able to return the user to the page they're on when they log in is not working properly
it's generating random (non-existing!) event links for me
example: from being logged out on the home page
<form action="?q=user&destination=event%2F2008%2F07%2F17%2Fday%2Fall%2Fall"...
leading to
http://www.example.com/event/2008/07/17/day/all/all
I don't even have the event module on this site, I have calendar but it doesn't produce URL's like that.
looking at the module code it is this line:
$form['#action'] = '?q=user&'. drupal_get_destination();
It's leading to a lot of page not found errors in my logs
Comments
Comment #1
Suzy commentedI've tweaked this module so it works for me see this post for more details but I am not confident of my module writing/patching capabilities, especially when it comes to forms - so I'll post what I see and hope someone else will find it usefu. or can roll a patch.
original in userloginbar.module:
I think parts of the form alter code need updated, or even removed as there is no need to alter to match exisiting functionality? At the very least only the ID might need fixing to avoid the duplicate ID that is being produced by the form and the wrapper div, though I would just change the ID on your wrapper div in the module code and then remove all the bits above, but that will require a CSS change too
for reference, from the user.module, showing why I think the drupal_get_destination function was 'wonky' for me,
and the #id value I don't think is being targeted properly in the userloginbar.module leading to the duplicate ID?
Suzy