How about hiding unused blocks from Disabled section of "admin/build/block"?
On large installations this page may be overloaded with too many unused blocks. In scenarios where regular user (site owner, non-drupaller) has access to that page he might be lost, asking too many questions. This feature would help to keep this page clean, leaving just the modules the user is expecting.

This feature would require a new configuration page with a checkbox list of currently disabled modules. Admin would tick checkboxes to hide corresponding disabled blocks.
To unhide some blocks, in case to start using them, checkboxes should be cleared for those blocks first.

There is discussion goes on about this at http://drupal.org/node/524632

Comments

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Postponed

I will get to this when I have time. Meanwhile anyone with any good ideas - and preferably a patch - is welcome to chime in.

nancydru’s picture

Well, I found a significant performance improvement in blocks, but it's a core hack and D7 is so different, I don't know if I can get a patch for D6 accepted or not. And it's a really trivial change.

However, while that cut the number of database queries by 70% and query execution time by a third, it did not do much for the page build time. Still looking...

j4’s picture

Hi Nancy,

Any progress in this. My blocks page is so loaded that it refuses to even open! Thanks in advance.

J

nancydru’s picture

Not much recently. But I suspect working at the theme level is not going to help much. The primary problem is that Blocks does too many queries that are unnecessary. Then it piles unnecessary URL look ups on top of that.

j4’s picture

Nancy,

Is there any way you can help me get the blocks page working again? Any way I can delete some unwanted blocks? I even tried removing the OPen calais module etc..but the white screen of death doesnt change..:(
Site is working normally, no issues, but any time the client would like to make any changes, I will be in a soup!

Thanks a ton!
Jaya

nancydru’s picture

There are several modules that can create tons of blocks that you may or may not use. If you can't get the page up, you can still browse the Blocks table in the database and see if any of those modules have ways to reduce the number of blocks. For example, the Web Links module can produce about a dozen blocks for each taxonomy vocabulary, but there are settings to not do that for vocabularies you don't care about. Probably the worst one is Panels, and I have no clue as to how to reduce that number (wish I did). If you use Panels with lots of blocks and mini-panels, you might want to ask Earl about how reduce the number. The real key here is to not create the unused blocks to start with.

EDIT: Also, most modules, and themes, do not delete blocks when they are uninstalled. As you are browsing the Blocks table, you may see some you can totally delete. Also, consider using the Site Documentation module which can fix some of those issues.

j4’s picture

Thanks Nancy. WIll check the database table.

J

Yuri’s picture

subscribing

momper’s picture

subscribing

petu’s picture

subscribing

Haidee’s picture

i wish this feature will be available sooner... this would be cool to keep the admin/block section free from unused and disabled blocks

nancydru’s picture

Some things to help in the meantime:

  1. Check modules for configuration options that might prevent the blocks from being created to start with.
  2. Submit issues for modules that create unneccessary blocks.
  3. Delete blocks from the database that are for themes (and modules) that are no longer in use. (See Site Documentation module.)
  4. Panels: Review your choice of using blocks as a source of data.
  5. Views: Don't provide a block view if you don't really need it.

Then there is the problem that if one does not show disabled blocks, how does one enable them? So far no one has offered options.

If you know what you're doing, there is an option for the l()/url() functions ("'alias' => TRUE") to prevent a path lookup for the configure and delete links. No one that I have ever heard of has ever created url aliases for these, and the path lookups waste an enormous number of queries and execution time. You can make that hack (not recommended) and it will help a lot.

Haidee’s picture

5. Views: Don't provide a block view if you don't really need it.

some disabled blocks are not necessarily doing nothing... in views (module) for example, it usually generate block that you can use in collaboration with some modules such as quicktabs (module).

quicktabs can call particular views block but still leaves the original views blocks under "Disabled" region.

nancydru’s picture

Yes, see #4.

millions’s picture

subscribe.

nancydru’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)

6.x no longer supported