Since CCL hooks in to hook_contextual_links_view_alter, it will only add contextual links to nodes or blocks that already have a contextual link.

The main content block (system-main) and the help block (system-help) are affected by this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bkoether’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Hi barraponto,

CCL is meant to be an extension of the core contextual module.
That means that you can add your custom links to elements that are supported by the core module.

The two blocks you reference above are special blocks that, to my understanding, are not meant to have contextual links.
Personally I also don't see much of a use case for these two blocks to have contextual links. Maybe you can explain a bit more what you're trying to accomplish.

I definitely don't see this as a bug, so I changed the category to support request.

bkoether’s picture

Status: Closed (works as designed) » Postponed (maintainer needs more info)
barraponto’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Active

My use case: I wanted to add a contact settings contextual link to the main content block on contact pages.

It's not that these blocks are not supported by core Contextual module, these blocks just don't get the Block module default contextual links. Any other module providing these blocks a contextual link would trigger CCL supporting them properly.

Anyway, I think adding hook_menu_alter and hook_block_view_alter just to support these two blocks more trouble than it's worth. Instead, CCL should remove these blocks from the available options.

barraponto’s picture

Status: Active » Needs review
FileSize
798 bytes

Here is patch.

bkoether’s picture

Status: Needs review » Fixed

Hi barraponto,

I agree with you. Hiding these blocks makes sense.
I added your patch to the dev version and it will go into 7.x-1.5.

Thanks,
Ben

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.