We have over a 1000 blocks on our site (most provided by aggregator or views, most of them currently disabled). The large number of disabled blocks on admin/build/block makes the page hang Javascript in Firefox 3. It used to load in Drupal 5, though it did take a long time.

The page can only be used when the table sort script is stopped. To fix this, I commented out the following in block-admin-display-form.tpl.php:

  // Add table javascript.
  drupal_add_js('misc/tableheader.js');
  /*drupal_add_js(drupal_get_path('module', 'block') .'/block.js');
   foreach ($block_regions as $region => $title) {
    drupal_add_tabledrag('blocks', 'match', 'sibling', 'block-region-select', 'block-region-'. $region, NULL, FALSE);
    drupal_add_tabledrag('blocks', 'order', 'sibling', 'block-weight', 'block-weight-'. $region);
  } */

It would be beneficial, though, if there were an option in the admin interface to disable table dragging on the blocks page, so that the tpl file wouldn't have to be edited.

Comments

gpk’s picture

Status: Active » Closed (won't fix)

You can also disable the blocks tabledrag script by disabling JS in your browser; you might then want to delete the has_js cookie so that Drupal doesn't get confused.

I doubt that an option as you suggest would make it in to Drupal core since the need is probably relatively uncommon. However a contrib module could probably handle this and be a more appropriate solution.

Marking as won't fix.

brad.bulger’s picture

the admin block configuration screen has always been slow and awkward, but with 6.x it has become completely unusable to me. i can't get it to load at all, i get warnings from the browser about an unresponsive script, and even trying to stop the script, the page never loads and never releases the browser process either. we have a lot of blocks but not thousands - maybe 200 between custom and module-supplied. (it doesn't help at all that our site is based on Tapestry and so has 30+ regions...)

it's all very well to say "won't fix" and dismiss this but it's a real problem. it is helpful to be able to customize the table and disable the javascript, but the whole issue of configuring block display needs to be rethought somewhat.

gpk’s picture

Yes, to be fair, disabling JS is not really a sensible workaround.

If you are having problems with a much smaller number of blocks then maybe this does need looking at. What browser/version/OS are you using?

A better workaround in the meantime to get rid of the tabledrag JS might be to override core's block-admin-display-form.tpl.php in the theme. Since something like Garland is probably being used for the admin theme this would either mean copying it to sites/all/themes, copying the template from modules/block to the them directory and then modifying the template there (thereby avoiding hacking core) or else setting up a new subtheme which merely overrides the template. A bit more of a fiddle to get this right though.

bpirkle’s picture

+1. We have 50 enabled blocks and 222 disabled ones. We went with the override-the-template-to-turn-off-tabledrag option, but it'd be nice if this wasn't necessary.

donquixote’s picture

Try
http://drupal.org/project/blockadminlight
(some feedback appreciated)