Hey all,

Can anyone give me the most basic/easiest way to delete a default block? I have too many, and the drag n drop ability is not working. If I can get my block <20, then I probably can get the drag n drop to work correctly.

I don't need "Who's New" or "Who's Online"...deleting those would get my count <20.

I could really use some help on this as I've spent way too many work hours trying to figure this out. I am trying to sell Drupal as a tool to use here at work, but if I cannot get things like this done in it...I may have to use a COTS instead.

Please help.

Thanks!

Comments

flamenco’s picture

I assume you're at Administer - Site Building - Blocks. I'll also assume you're using 6.9 if you're "selling" it.

I'll cover the easy first... to drag those, you need to have your mouse right on the little cross at the left of the item. When you've dragged the item to Disabled, you have to click Save Blocks or the change won't stick.

If none of that works, for the Region drop-down for that item, choose "none", and Save Blocks.

If that doesn't work, good luck.

Jenn’s picture

Hello and thanks for a response. I guess I left some assuming up to potential 'repliers'.

Yes, I am admin and using 6.9

I know how to use the blocks, I can move them around all day as I wish using the Garland theme. But I created a new theme, and the drag handles are showing, but I cannot drop the blocks anywhere. They just stay locked to my mouse. After doing some searching, there seems to be a bug with having >20 blocks. So if I can delete some default blocks, ones that I will never need to use, then I can get under that 20 count and hopefully use the drag and drop as intended.

Also, I do not get the drop-down option. I do know that the drop-down works in Garland, but I don't get that option in my new theme.

So back to my original question...how can I delete a default block? I don't need blocks like 'Who's New' or the 'Powered By Drupal' blocks. And don't worry, the customer DOES know we are using Drupal, they've been educated on it many times.

Any help with deleting a default block completely from the admin->blocks-> would be greatly appreciated.

OneTwoTait’s picture

I would like to know this too... Just disabling them isn't enough. I probably have 40 blocks and 15 of them I would never use so I want to delete them.

axolx’s picture

Also interested in this. If anyone knows the answer pretty please post!

seworthi’s picture

My solution was to open the database, edit the "blocks" table, changing the status value from '0' to '1' on each block I wanted to remove from the list. To find the correct entry, hover over the "configure" link to get the value (like user/2 or user/3) for the "Who's New" or "Who's Online" block. I have not had any problems yet, but please use at your own risk.

Do not forget to match your theme type in the table.

I believe this only hides the link from the admin/blocks page.

Scott

tnutall’s picture

I'm trying to figure this out as well.
Does anyone have the answer to this?

boboman’s picture

This might because the block code was hard coded in the template itself. Try open up the template file to see if you can manually remove it.

tnutall’s picture

I looked through the temp and that block info was not there

vm’s picture

You cannot delete default blocks provided by a module or by core. The only blocks that can be deleted from the admin UI are, for the most part, blocks that have been self created.

One would have to hack core to remove default blocks and when core is hacked it's been said, god kills kittens.

tnutall’s picture

Well can the default block be at least edited?

vm’s picture

edit it in what way?
you have the admin ui edit feature allowing you to change some things.

you can theme it/style using the theme layer

there are likely hooks you can plug into from the api side of things as well.

tnutall’s picture

This is what the default reads:

Welcome to your new Drupal website!
Please follow these steps to set up and start using your website:

1.Configure your website
Once logged in, visit the administration section, where you can customize and configure all aspects of your website.
2.Enable additional functionality
Next, visit the module list and enable features which suit your specific needs. You can find additional modules in the Drupal modules download section.
3.Customize your website design
To change the "look and feel" of your website, visit the themes section. You may choose from one of the included themes or download additional themes from the Drupal themes download section.
4.Start posting content
Finally, you can create content for your website. This message will disappear once you have promoted a post to the front page.
For more information, please refer to the help section, or the online Drupal handbooks. You may also post at the Drupal forum, or view the wide range of other support options available.

I don't want this to show.

vm’s picture

not at all sure what that has to do with blocks, or deleting a default block?

The default drupal welcome message can be manipulated one of many different ways.
you can:
edit your page.tpl.php file and remove the $content variable.

create a page-front.tpl.php file and remove the $content variable as well as whatever else you don't want, and include whatever you do want.

create a page content type and set it to be the default front page in administer -> site information

Promote content to your front page (provides a list as seen on many webwebsite including but not limited to drupal.org.

Then when you want front pages with more integrations or complexity, you can employ, panels, nodequeue, veiws, and their dependencies and addons.

vm’s picture

Those in this thread who want to manually adjust the weights of the block (in a dropdown)
can disable javascript in your browser. if already in the administer -> blocks ensure you refresh the browser page

disabing javascript with disable the drag and drop feature. you can then enable javascript when you are finished moving your blocks.

tnutall’s picture

volocuga’s picture

In d6 you can remove useless blocks from drag n drop table by using template_preprocess_block_admin_display_form function

For example, place the code into your template.php

function THEMENAME_preprocess_block_admin_display_form (&$vars) {
unset($vars['block_listing']['-1']['system_0']);
}

The code above removing default system block with drupal logo

OR

To remove all disabled blocks do this:

function THEMENAME_preprocess_block_admin_display_form (&$vars) {
unset($vars['block_listing']['-1']);
}

Enable Devel module to browse array available array elements

drupal.newbie’s picture

I was wondering how to do it just like you! Then with some playing around with my site files I figured out how to do it:

  1. It is pretty simple just open your site file manager, then go to the folder where your theme is - in my case it was "/htdocs/drupal/sites/all/themes/rootcandy".
  2. There you will find a ".info" file, open that file and there you can see regions[block_name]=block_title list where you can delete unused blocks from!



Good Luck !

vm’s picture

That removes the regions where blocks can be displayed. Not the default blocks themselves provided by drupal core or contrib modules. Also of note. What you are doing there is theme specific and not site wide. RootCandy being an admin theme only affects the admin area.

Delawaredbutters’s picture

never mind, they all came back somehow ?

My block page wont load because I have too many blocks for my server to handle.

Over 1000 in my database, I use 5 of them! WTF drupal? Do we really have no way to delete unwanted blocks from the admin block page?

Who ever asked for drupal to make these blocks in the first place? What is the point of automatically creating a block for every feed created if too many blocks can cause the block admin page not to load!

How is their no fix for such a common and simple complaint?

vm’s picture

blocks being created by WHAT feed module?

If it's a contrib module causing these blocks to be created one should check the issue queue of said module, or settings for said module.

Thremulant’s picture

At first I create some contents that would be created as blocks, but with the time I change the solution to views, so I disable the option from my content type, but now I have a list of the blocks that were created at that time without the Delete option, any ideas to get rid of them?? Thanks in advance.

vm’s picture

custom blocks should indeed have a delete link at administer -> blocks

are you sure they weren't create by a module?