I created some custom blocks with just plain HTML in them, and now I can't find a way to edit their content. administer->block only allows "configure" or add new block. Blocks don't show up under content.

Also I can't seem to delete these blocks once they are created. Not good.

(And yes have done extensive search on drupal.org website, no relavent hits on editing content, just how to create custom blocks, which I know how to do.)

Comments

jeepfreak’s picture

You should be able to edit the blocks in administer->blocks by clicking the configure link for the custom block. There should also be a delete link directly to the left of the configure link. You can only delete custom blocks this way.
HTH,
Billy

PS - I run v4.6 and that's all I know... I'm not sure which version you're running.

voytechs’s picture

When I hit the delete link (adminisiter->block->delete), I get the delete warning and confirm the delete, but the block doesn't go away.

I also don't get an edit menu or tab on the administer->block->configure page. All I get is:

On top (cut/pasted exactly):
'' block

User specific visibility settings
...

Page specific visibility settings
...

Content specific visibility settings
...

SaveBlockButton

kevjin’s picture

I am new at this too and I LOVE Drupal.

Here is what I found so far.
I created a custom block and kind of lost my way when I go back to edit them. (RTFM grin)

You have to navigate to the menu section

Home » administer » Menus

Then you need to "add a menu item"
Then make your parent item you "Custom Block Name"

Kevjin
www.ninox.ca

t-raven’s picture

thing is that i need full control over the html of the content .....

for example i have block with three items:

books
prints
posters

when i look to the site there is this list

  • books
  • prints
  • posters

where each li tag have class "leaf"

now i want to edit that, so each li will have same class as name of the item, but even in themes editor there whole this list in $content ... :(

thanx a lot for any ideas

fatius@slap.screep.com’s picture

I'm having this same problem. I can't figure out how to edit the html content of a custom block ... (I don't think it's in there.)

Anyone know how to do this?

roni1’s picture

Did anyone ever figure out how to go back and edit the custom block (content, not settings) you have already created? I couln't find it in the block documentation. I know it can be done because I've done it, but now can't remember how (duh).

roni1’s picture

Jeapfreak was right, you go to administer->blocks, and click the configure link for the custom block. But what got me confused was that I clicked configure for one of the module blocks instead, and they don't, of course, have custom code you added. The ones you can edit have the delete link next to them.

Just in case anyone else does what I did...

halftone’s picture

I am struggling with the same issue. I need to be abkle to periodically revise the content of a custom block which presents different menu items to different user roles. As new roles (actually companies - clients) are added, the block has to be revised to present their custom menu choices. In my case, these are private photo archives within embedded Gallery2.

I can't find an 'edit block' facility anywhere. Administer>>blocks>>configure does not offer 'edit', nor even 'delete' for custom blocks, at least not in Drupal 4.6. Enabled or disabled makes no difference. Maybe rani1 is using 4.7?

I'd happily delete the block and recreate a new one, but I can't seemingly even do that - enable/disable seems to be the only option. I'm not sure what will happen if I create a new block with the same name... without a 'delete' option, I'm wary.

Regards
Tony Sleep

heine’s picture

One of my sites is on 4.6.6 and admin/block has a 'configure' link for custom blocks that takes you to a page where you can edit the block body. The delete link is right behind 'configure'. Both in the column 'Operations' of the block table.
--
When your problem is solved, please post a follow-up to the thread you started.

halftone’s picture

It's weird. I later created another custom block and (so far) I can edit or delete that one. But I cannot edit or delete several I made earlier!

I then had a lateral thought which I hoped would solve my problem, using <?php include("myblock.inc"); ?> within the custom block, pointing to 'myblock.inc' in the includes folder. That would mean I could revise the .inc file without messing with the block itself. However it isn't working. Although the .inc file PHP works fine on a test page I get nothing back in the block, no errors, zilch. HTML in the .inc file works OK though.

(several hours later...)

I eventually gave up wondering what the hell I'm doing wrong, I found that my newest custom block was still editable even though others mysteriously aren't, so I took out the include and stuffed the whole of the code in there and it works just fine. Aargh.

I just hope it stays editable...

Regards
Tony Sleep

nosro’s picture

I 've had the same bug. A block I made yesterday isn't deletable or editable, yet 3 blocks I made today are. I switched the default theme between creating that first block and the rest, so I tried switching theme again and creating another block, but I can't reproduce the problem.

- orson bradford

nosro’s picture

The un-editable block was in fact a menu, which shows up in the edit block section, but with different controls. So either my block was converted to a menu, or I suffered a bout of amnesia and created it as a menu to start with.

halftone’s picture

[edit]
Sorry, I posted rubbish, I think.

meric’s picture

Typically, you can edit custom blocks (content) by having the "administer blocks" permission..

But that alone doesn't solve it.. It also depends on the input format used. If you aren't allowed to use the input format used to create the block, you can't edit its content.

Aside from the input format settings.. these entries in the Access Control would let you have full control of the custom blocks:
- Administer Blocks
- Administer Filters

If you have these permissions enabled for your role.. you can then edit the custom blocks' contents.

ebranda’s picture

I came across this thread (which is now old, but still relevant) because I was having the same problem. It turns out that I originally created the custom block through the Views module, NOT through the Add Block feature of the Block module. You can check this by querying the db directly (SELECT bid,module FROM blocks). Edits to this kind of block need to be done through Views (Administer -> Site building -> Views) rather than through block configuration.

Holy Harmonica’s picture

I found that I couldn't find the configure and delete 'buttons' to edit a block on the administration/build/block page. It seems to be a browser characteristic. I use Opera. The blocks were in a very narrow column in the center of the screen. All I had to do was zoom out. Voila, the configure and delete buttons appeared.

sushilck’s picture

In block layout page there is an additional tab present named as Custom block library from where you can edit custom block content in drupal 8.

dieuwe’s picture

Thanks. This thread was the top hit on Google for me, even though it dates back to 2005 and the question is not at all related to Drupal 8.

drupalinthailand’s picture

Anybody else having this problem on Drupal 8 ?

There is a menu to edit the content of your customs blocks.

But I cannot find how to change the block visibility, for example if I want to show the block only to anonymous visitors (not logged) how can I do ?

Thanks for your feedback.

ameer khan’s picture

I can't edit the content for anonymous user blocks in drupal 8.

jdln’s picture

This confused me for a bit. In D8 click on the "Custom block library" tab which is next to the "Block layout" tab.

7drupel7’s picture

If you go to Block layout tab, select a region and click in "Place block" button to activate it.
There you can see and select your custom blocks, after click in "Place block" button again you can change the visibility settings.
its super confusing at the begining.

msrokni’s picture

You should go to " > Manage >Structure > Block Layout > Custom block library" in order to edit the block content.