Closed (fixed)
Project:
Weight
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2006 at 18:00 UTC
Updated:
26 Nov 2006 at 06:02 UTC
In order to get admin/node/weight/_change_weight to fire when changing the value in a dropdown, I had to remove the leading "/" in the generated Javascript code.
I'm not attaching a patch since this is a 1 character change from:
$selector_template = "\n" . "<form><select onchange='httpRequest(\"GET\", \"" . base_path() . "/admin/node/weight/_change_weight/\" + [NID] + \"/\" + this.options[this.selectedIndex].value,true)' >";
to
$selector_template = "\n" . "<form><select onchange='httpRequest(\"GET\", \"" . base_path() . "admin/node/weight/_change_weight/\" + [NID] + \"/\" + this.options[this.selectedIndex].value,true)' >";
Note that this may only be an issue when base_path() returns "/"...
Comments
Comment #1
marcp commentedSet status to patch (code needs review).
Comment #2
jjeff commentedIt sounds like this is a problem with clean vs. "dirty" URLs.
I'm guessing that the url() function could be leveraged to handle the problem better than just using base_path():
(untested)
The extra arguments for url() tell Drupal to give the complete absolute URL (which includes the base path). This should make sure that things work for both clean and unclean URL settings.
Comment #3
jjeff commentedugh... nasty... here's some line breaks to make this (slightly) easier to read:
Comment #4
harry slaughteri can't reproduce this problem with clean urls on or off.
however, i do see the gratuitous slash. this is fixed in HEAD. Should be in weight version 4.7.x.1.3 if my understanding of the new release process is correct :)
what browser/os are folks using who are seeing this problem?
Comment #5
(not verified) commented