Closed (fixed)
Project:
Block edit
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2008 at 01:08 UTC
Updated:
9 Jun 2009 at 19:50 UTC
Jump to comment: Most recent file
Line 21 of block_edit.js anchor element ( Edit ) assumes Drupal is running at the web root. However, if you're running Drupal in a sub directory of the web root, clicking the EDIT link returns a 404 error. I fixed this by removing the first slash (/) from the href attribute of the anchor element. This code revision still allows block_edit to run properly when Drupal is running in the web root or a subdirectory of it. Just a heads up ;) Great module!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | block_edit-basepath-337156.patch | 903 bytes | psynaptic |
| #5 | block_edit-basepath-#337156.patch | 903 bytes | psynaptic |
Comments
Comment #1
chason commentedAfter further testing, what i posted isn't the case :( Still a great module!
Comment #2
chason commentedMore testing and found that if added Drupal.settings.basePath preceding the href value, it works for sites in subdirectories...
<a href="'+Drupal.settings.basePath+'admin/build/block/configure/' + block_path + '">Edit</a>Comment #3
tryitonce commentedHi there,
this solution -
<a href="'+Drupal.settings.basePath+'admin/build/block/configure/' + block_path + '">Edit</a>did not work for me on a localhost installation with a subdirectory called Drupal-A2T - full path =http://localhost/Drupal-A2T/.In the file - block_edit.js - I added the subdirectory Drupal-A2T to the line:
var block_link = '<div id="bel_id_' + block_id + '" class="block_edit_link"><a href="/Drupal-A2T/admin/build/block/configure/' + block_path + '">Edit</a></div>';And that seems to work now. It would be great to add another way of configuration to this module to solving this problem.
Otherwise I am now looking forward to using this module to speed up my work and shall happily say thanks to all those helper and advisers who are getting me into Drupal - fantastic thing OpenSource!!!!
Comment #4
meet.h.thakkar commentedcan any one give patch for this ????
Comment #5
psynaptic commentedI actually fixed this problem before finding this issue. Just just about to pop over and post a new issue but thought I'd check first.
Solution in #2 is the same as the one that I have used and I have attached a patch.
Comment #6
psynaptic commentedComment #7
psynaptic commentedThis has been committed to DRUPAL-6--1. http://drupal.org/cvs?commit=216742
Thanks to all who contributed!