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!

Comments

chason’s picture

After further testing, what i posted isn't the case :( Still a great module!

chason’s picture

More 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>

tryitonce’s picture

Hi 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!!!!

meet.h.thakkar’s picture

can any one give patch for this ????

psynaptic’s picture

Status: Active » Needs review
StatusFileSize
new903 bytes

I 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.

psynaptic’s picture

StatusFileSize
new903 bytes
psynaptic’s picture

Status: Needs review » Fixed

This has been committed to DRUPAL-6--1. http://drupal.org/cvs?commit=216742

Thanks to all who contributed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.