Closed (fixed)
Project:
Drigg
Version:
5.x-1.30
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
2 May 2008 at 21:35 UTC
Updated:
17 Aug 2008 at 11:12 UTC
Jump to comment: Most recent file
Navigating to www.drigg.org/submit url (url used in bookmarklets) redirects user to www.drigg.org/user/register?destination=...
When existing user then clicks on "login" tab, the destination querystring is lost.
Site should redirect to www.drigg.org/user/login with destination querystring preserved, so that user can login and populate the submit form.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | bookmarklet-fix-254092-6.patch | 2.38 KB | sikjoy |
Comments
Comment #1
mercmobily commentedHi,
Please provide:
* A link to a bookmarklet with Drigg stories
* Exactly how to reproduce this, step by step, describing what happens and what _should_ happen
Be as precise as possible. Thanks!
Merc,
Comment #2
pileo commentedThis bug repros without the bookmarklet code...it is just very prominent when using with a bookmarklet, since it requires user to click to "Login" and looses the destination querystring. Basic repro steps are listed below.
Repro steps:
1. Make sure user is not logged in at the drigg site (www.fxscoop.com for this example)
2. Navigate to http://www.fxscoop.com/submit?url=http://www.drigg.org&title=Drupal%20ba...
Results:
-User is redirected to http://www.fxscoop.com/user/register?destination=submit%253Furl%253Dhttp%25253A%25252F%25252Fwww.drigg.org%2526title%253DDrupal%252Bbased%252Bdigg%252Bclone%2526body...
-After user clicks "login" tab to enter credentials, the ?destination=.... querystring is lost, and after login user is redirected to default page
Expected Result:
- User should be redirected to http://www.fxscoop.com/user/login?destination=submit%253Furl%253Dhttp%25253A%25252F%25252Fwww.drigg.org%2526title%253DDrupal%252Bbased%252Bdigg%252Bclone%2526body...
-User should then enter credentials, and be redirected to "submit" page, with URL and TITLE fieild pre-populated with values from querystring
Comment #3
pileo commentedComment #4
pileo commentedLink to bookmarklet can be found here: http://www.fxscoop.com/partner
Comment #5
mercmobily commentedHi,
This is not a bug, this is a feature request.
Basically, the Grigg administrator should be able to pick whether users should be directed to the SIGNUP page, or the "register" page.
The current behaviour is the most common one -- it's rare that people already have a drigg account, and if they have it, they aree probably already logged in and therefore don't need to register.
However, I think it's a good idea to implement this as a feature request.
Bye,
Merc.
Comment #6
sikjoy commentedHere is a patch written by cedricfontaine.
It stores the redirect address in the user's session variable. That way it does not get lost if the user needs to click the register tab.
Nice work Cedric!
Pileo, can you please test this patch?
--sicjoy
Comment #7
mercmobily commentedHi,
Sicjoy, the percentage of people actually applying the patch and testing it is so small, I wouldn't count on it.
I would apply this patch. Since thanks to Cedric we are basically fixing the lot, I vote for actually applying the patches, and then tell everybody to test carefully Drigg in the next release before deploy. This is hardly gonna be a showstopper anyway...
Unless pileo is able to test it right away, please apply. That way, we can all see it on www.drigg.org anyway.
Bye,
Merc.
Comment #8
mercmobily commentedHi,
Guys... how come we unset the cookie in function drigg_taxonomy_form_term() ...?!? :-D
No normal user will ever go there... that's an admin-only page!
Merc.
Comment #9
cedricfontaine commentedYou're right... My error. Working on fix it.
Comment #10
cedricfontaine commentedYou're wrong Merc ! We unset values in drigg_form. That's a bad reading form you of the patch...
function drigg_taxonomy_form_term() { appears in it cause we modify the function just before (drigg_form_alter($form_id, &$form) {)
Patch is ok and running ! Please apply to source code.
Comment #11
mercmobily commentedHi,
Patch applied!!!
Merc.
Comment #12
sikjoy commentedIn the future, to eliminate confusion, please use the -up switch with diff when creating patches. It adds the function name to the context of each change in the file.
I also like to include the module name, description, issue number, and comment number in the patch's filename. For example if I were adding a patch here I would use:
cvs diff -up > drigg-redirect_fix-254092-12.patchHere is an awesome tutorial for creating patches for drupal.
--sicjoy
Comment #13
mercmobily commented