When disabling the core block system I cannot get to the block configuration pages.

For example: admin/build/block/configure/block/[block-id]

It would be good if I could disable admin/build/block but still be able to get to admin/build/block/configure/block/
becase these pages have block settings other than just context related settings that need to be able to be accessed.

Unless there is another way of getting to these block configuration pages that I am not seeing, using the inline editor or something?

Comments

yhahn’s picture

Agreed, perhaps a link from the inline editor blocks as well as a link from the backend editor.

Will look at this post 3.0.

xjm’s picture

Tracking. I actually wrote a shell script to turn this setting on and off because I have to do it so frequently. ;)

chellman’s picture

Subscribing. I was thinking of writing a module that does nothing but allow editing of the block body, but I'm not sure that's a good idea.

yareckon’s picture

Definitely needed.

jeffschuler’s picture

chellman’s picture

StatusFileSize
new974 bytes

Taking another look at this, it seems like all this feature does is unset menu items. It's not really disabling block module or anything more drastic.

So, instead of disabling admin/build/block*, might it be sufficient to just unset admin/build/block? That way the main block administration page is hidden, but it's still possible to get to other useful parts of the block UI (configuration screens being the big one).

If so, I've attached a patch for 6.x-3.x-dev that does it. If you're using 3.0, just replace context_menu_alter() in context.core.inc with this:

/**
 * Implementation of hook_menu_alter().
 * If core block handling is disabled, remove the main menu item.
 */
function context_menu_alter(&$items) {
  if (variable_get('context_reaction_block_disable_core', FALSE)) {
    unset($items['admin/build/block']);
  }
}
chellman’s picture

Status: Active » Needs review

Forgot to change status.

jeffschuler’s picture

I've opened a related issue: #1000360: Contextual disabling of core block rendering: a feature request for the ability to disable core block rendering within in a particular context.

agileware’s picture

This issue is related to the administration of blocks as opposed to the rendering of blocks.

kirkcaraway’s picture

I used this patch, and it does add a link to add new blocks, and a "list" link that brings up my themes. But clicking on those theme links brings up blank page, so there is still no way to adjust settings on individual blocks. This makes it hard to work on blocks if you use a theme that allows for block styling and other options. Any other solutions to this problem?

nicholas.alipaz’s picture

StatusFileSize
new3.16 KB

Been running into this issue too. I want to do the following:

  • Disable admin/build/block and all admin/build/block/list/* pages.
  • Leave enabled admin/build/block/add and similar pages
  • Leave enabled admin/build/block/configure and admin/build/block/delete/*

This patch accomplishes this, along with the following:

  • Creates new page at admin/build/block-context to mimic the list of blocks given by admin/build/block without drag/drop
  • Removes admin/build/block
  • Duplicates menu entries for admin/build/block/configure and admin/build/block/delete/* at admin/build/block-context/configure and admin/build/block-context/delete/* as tabs on the admin/build/block-context page
  • Leaves admin/build/block/add|configure|delete etc intact but changing them to be simple MENU_CALLBACK menu items, so as to keep them from showing in menus.
  • Redirects any request for admin/build/block to admin/build/block-context
  • Explains that drag/drop has been removed because context is managing this.

Hope this gets into the module. Please test!

nicholas.alipaz’s picture

BTW, anyone having trouble with the last patch or this patch not showing when testing likely needs to clear their menu cache.

fxarte’s picture

I tested the patch and it seems to mostly work as expected, only the third bullet, I could not find the tabs or it was not showing properly.
I used 6.22 with Garland

nicholas.alipaz’s picture

fxarte, did you clear the menu cache?

fxarte’s picture

Hi
Yes I did clear the menu cache, and nothing.
Maybe I'm looking at the wrong place, they should be at: admin/build/block-context, right?

nicholas.alipaz’s picture

Go to admin/build/context/settings and disable the core block system.
Flush menu cache if needed.
If you use administration menu you may need to flush it as well, if it shows duplicate menu items
Then browse to admin/build/block-context

We can automate the cache flushing, this was just a first pass at the patch to see if it works from an operational standpoint for others here.

fxarte’s picture

StatusFileSize
new172.92 KB

After following those steps, this is what I'm seeing:

nicholas.alipaz’s picture

your png didn't come through for one reason or another.

fxarte’s picture

StatusFileSize
new172.92 KB

sorry about that, let's see now

nicholas.alipaz’s picture

As they say, a picture is worth a thousand words, and yours now indicates what you were saying which I hadn't really understood. You are missing the tabs I mentioned in my post.

I think I may have just mis-stated. They aren't tabs, they are simple links within the table list, as your screenshot shows:
Title configure delete

The configure and delete links are the "tabs" I mentioned.

fxarte’s picture

Then I can confirm that your patch works for me too.
Great!

fxarte’s picture

Status: Needs review » Reviewed & tested by the community
nicholas.alipaz’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for setting as RTBTC, I think however the patch may need a small change. It should flush the menu registry whenever saving the settings. I will look into this.

As it stands you could end up with two sets of block configuration menu items when switching the "disable block administration" option back and forth.

nicholas.alipaz’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new3.6 KB

It looks like I was not getting duplicate menu items. It was only admin menu which was not having it's cache rebuilt. I have added the function for flushing the admin menu cache to my patch, but feel free to remove it and we can post an issue against admin menu if better fit to exist there.

Marking as RTBTC again since I only added 3 lines to the patch that would only effect those with admin menu.

kristen pol’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)

Thanks to everyone for the work on this issue. Closing as outdated as this is for Drupal 6.