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.
Just noticed that all of my watchdog location links are wrong, they say: /drupal_cvs/drupal/?q=node/941/edit
but the link is actually http://localhost/drupal_cvs/drupal/?q=/drupal_cvs/drupal/%3Fq%3Dnode/941/edit
... eww, using the site root too many times it appears.
Comment | File | Size | Author |
---|---|---|---|
#20 | request_uri_3.patch | 5.03 KB | chx |
#19 | request_uri_2.patch | 4.96 KB | chx |
#15 | request_uri_1.patch | 1.39 KB | chx |
#12 | request_uri_0.patch | 1.41 KB | chx |
#5 | watchdog.module_0.patch | 1.53 KB | m3avrck |
Comments
Comment #1
kbahey CreditAttribution: kbahey commentedI cannot reproduce this.
I tried with two sites, one is beta3 installed in a subdirectory, and the other is today's HEAD installed in documentroot.
Can you post what is in your $base_url from settings.php?
Comment #2
m3avrck CreditAttribution: m3avrck commentedYes I have latest HEAD too, very strange.
$base_url = 'http://localhost/drupal_cvs/drupal';
All of the location links are wrong (actually clicking the link that is). Hmmm, in the DB they are correct but some reason or other all of the parent folders are used twice. It seems it is a sub-directory issue, no?
Comment #3
kbahey CreditAttribution: kbahey commentedFrom the looks of it, it seems that the part is duplicated:
?q=/drupal_cvs/drupal/?q=
Which theme are you using? Does it output a base href?
If all else fails, try this:
- Download or checkout the latest Drupal HEAD.
- drop all tables in the database.
- Reinstall Drupal at the same location, with the same $base_url.
- Create the database.
- Check if watchdog still has an issue.
Comment #4
m3avrck CreditAttribution: m3avrck commentedUsing default bluemarine theme.
<base href="http://localhost/drupal_cvs/drupal/" />
I'll try clearing my database and what not soon enough, I just did this a few days ago, I still think this might be a sub-dir issue with either l() or url() or similar. Tried tracking it last night but good to tired, I'll look into this more soon.
Comment #5
m3avrck CreditAttribution: m3avrck commentedOk here's a patch to fix this. Seems the problem stems from the fact that request_uri() will return say: '/drupal_cvs/drupal/?q=admin/node' and this is stored in $watchdog->location. However, this is then passed to l() where that whole string is appended to $base_url which causes this funky behavior.
Tested and working correctly now on Apache 2.0.55.
Comment #6
drewish CreditAttribution: drewish commentedI don't think this patch will work. I'm running into this with clean URLs enabled and all my links end up like /node/231, the leading slash makes it useless. The base URL needs to be appended in some place. I'm going to do a little digging and see if I can get a patch working.
Comment #7
drewish CreditAttribution: drewish commentedsee also: http://drupal.org/node/49211
Comment #8
puregin CreditAttribution: puregin commentedFor some reason the offset of '+ 3' in the
strpos()
call seems to chop off too much when I tested this.Comment #9
Dries CreditAttribution: Dries commentedI think we should change request_uri() to return a different URL. It should return URLs relative to the base url, not relative to the root.
This will also fix the use of request_uri() in the page caching.
Comment #10
markus_petrux CreditAttribution: markus_petrux commentedhmmm... is this one related? a dup?
http://drupal.org/node/47255
Comment #11
m3avrck CreditAttribution: m3avrck commentedSeems related to me.
And another one: http://drupal.org/node/41595
Comment #12
chx CreditAttribution: chx commentedThis was a hell to roll. I am afraid a bit that this will break already existing translations? Killes, please comment.
Comment #13
chx CreditAttribution: chx commentedThis little excerpt from IRC can't replace the full review which I hope will shortly follow, but from IRC talk it seems killes is OK with the change and it won't break locale. How OK he is with the change -- we shall see when he commits. To further that -- review please!
Comment #14
chx CreditAttribution: chx commentedafter this patch, we get the aliased drupal path + querystring in request_uri. I am not sure about the slash in front. I will give it some more thought...
Comment #15
chx CreditAttribution: chx commentedFor reasons unknown my system went over to rolling -p1 patches. I will investigate. Anyways... it seems that a) slash trimmign is not needed b) unclean urls are a problem -- the equal sign of ?q= is still encoded at watchdog. But it's progress, still.
Comment #16
chx CreditAttribution: chx commentedComment #17
m3avrck CreditAttribution: m3avrck commentedHmm, still not working here.
Location ?q=logout
But that link is actually:
http://localhost/drupal_devel/drupal/?q=%3Fq%3Dlogout
Looks like it is using q= twice there.
Seems to work with clean URLs though.
Comment #18
m3avrck CreditAttribution: m3avrck commentedThis other issue I had, http://drupal.org/node/41595 , has issues with q= too in the l(). Semi related.
Comment #19
chx CreditAttribution: chx commentedit's easy and necessary to remove the double encoding. still we have two ?q=
Comment #20
chx CreditAttribution: chx commentedBrute force patch which turns request_uri always into aliased drupalpath+querystring.
Comment #21
m3avrck CreditAttribution: m3avrck commentedAlmost working, however one problem with clean urls disabled.
http://localhost/drupal_devel/drupal/?q=node?destination=node
Seems it adds an extra ? instead of an &
Comment #22
drummDoesn't apply and m3avrck raised an issue.
Comment #23
chx CreditAttribution: chx commentedSteven fixed this in 4.7 already
Comment #24
(not verified) CreditAttribution: commented