Closed (fixed)
Project:
Drupal core
Version:
4.7.4
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2006 at 04:09 UTC
Updated:
9 Jul 2009 at 15:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
stevenpatzI can't reproduce. If I am logged out. I see the user login block, but no "'Login or register to post comments" link.
Comment #2
jeff h commentedThis bug does seem to be consistently reproducible, both in my own site and on drupal.org.
As an example, go to the URL http://drupal.org/node/81557. Scroll past the initial post, and you'll see just above the first comment a line reading "login or register to post comments". Both the login and register links have %23 in them where there should be a #.
The login link in the above case is: http://drupal.org/user/login?destination=comment/reply/81557%2523comment...
Comment #3
TomyLobo commentedi think i fixed the bug mentioned
unconed told me that the original "bug" was a workaround to a mod_rewrite bug so i think this should only be applied if necessary
patch details:
i started from that version: // $Id: comment.module,v 1.455.2.7 2006/07/18 10:46:24 unconed Exp $
i replace both occurances of "drupal_urlencode" with "urlencode"
done :)
this makes those login urls look a bit less nice but at least they work (for me :))
Comment #4
Liberation commentedWell done TomyLobo, that fix appears to work.
If you look in the Drupal admin logs, you also found these errors prior to the fix being applied:
Type Date Message User Operations
php 02/09/2006 - 8:07pm You have an error in your SQL syntax; check the manual ... Guest
php 02/09/2006 - 8:07pm implode() [ Guest
php 02/09/2006 - 8:07pm Invalid argument supplied for foreach() in ... Guest
Thanks again.
Comment #5
mfbIt would seem the actual bug is that a #fragment should not be passed as part of a destination URL, because #fragments don't work in redirects. I've attached a patch to remove it.
Comment #6
mfbHere's a corrected patch, there were two mentions of #comment_form in the module.
Comment #7
spottybones commentedI apologize if the following question is inappropriate... I have a patch to resolve this issue but it's made against user.module, not comment.module. I believe it's a better solution as it preserves the fragment id. Is it proper to post that here or should I open a new issue on user.module (referencing this one) and post there?
Comment #8
mfbPlease feel free to post it here. I had no idea it was possible to preserve the fragment part of a URL thru a redirect, if so, cool!
Comment #9
spottybones commentedSorry for the delay, I was OBE. The attached patch is built for the DRUPAL-4-7 branch but will apply on DRUPAL-4-7-3 as well. I traced the problem to the destination URL in the query string being url encoded enough times that it then coudn't be parsed. This patch urldecodes it once before using it as the form action and it eliminates the problem for me.
Comment #10
Pugs commentedI'm sorry and apologize for my ignorance.
How does one apply these patches?
Comment #11
killes@www.drop.org commentedmoving to HEAD to get more reviews.
Comment #12
spottybones commentedPugs, after backing up your Drupal files and database follow the instructions here: http://drupal.org/node/60108
Comment #13
neclimdulI can't recreate this with HEAD or 4.7.4 so I'm going to mark this fixed. Please reopen against the proper version with more information if I'm wrong.
Comment #14
stevenpatzWhat version is Drupal.org running? It's not fixed for that version.
Comment #15
blue car commentedHi, I've just downloaded Drupal 4.7.4 and set it up with php 4.4.2 running on Linux 2.4 and I get exactly the same problem. Applying the patch to user.module supplied in one of the above comments fixes the issue.
I don't know if the problem affects all Drupal 4.7.4 installations, or only those running php 4.4.2, or whether there is something else which determines whether or not it happens. Admittedly the problem does not occur on Drupal.org, but I have found a live website running Drupal 4.7.4 where the problem can be seen:
http://beta.ivrpa.org/
This blog entry indicates that the site is running 4.7.4:
http://beta.ivrpa.org/node/657
To reproduce the problem, visit the above site, register an account, then find where it says "login or register to post comments", and login using that login link (not the ordinary login box). After you login you should be redirected back to the node you were commenting on, but instead you will get a page not found error.
As I mentioned the issue seems to be fixed by at least one of the patches available on this page. I think the fix should be incorporated into Drupal to resolve this issue.
Comment #16
killes@www.drop.org commentedthis is apparenlty fixed in 4.7 HEAD as evidend here on drupal.org
Comment #17
(not verified) commented