I produced the attached screenshot by configuring the dashboard and then dragging a block around within the disabled blocks region. Suddenly, the contextual links appeared! This should never happen :)

Note that the fact that the contextual links appear unstyled in the screenshot is a separate bug (#831082: Contextual links appear unstyled on the dashboard configuration screen when you start off with an empty dashboard). This issue is just about the fact that they shouldn't be appearing within the disabled region at all.

Comments

David_Rothstein’s picture

This might be a duplicate of #639172: Disable contextual links on the dashboard page while within customize mode. That issue is kind of confusing and seems to have evolved in some other direction, so it's hard to tell :)

jody lynn’s picture

Status: Active » Closed (works as designed)

I can't reproduce this one now, re-open if you still can.

jody lynn’s picture

Status: Closed (works as designed) » Active

Wait, I just did reproduce it. I had to first drag everything into 'disabled', save it, and then drag the disabled ones around.

jody lynn’s picture

Basically, contextual.css is not being loaded in this case.

jody lynn’s picture

Status: Active » Needs review
StatusFileSize
new621 bytes

The contextual library needs to be added up front, because if new blocks needing it only appear via AJAX callback, it's too late to add new CSS.

David_Rothstein’s picture

Status: Needs review » Active

Your patch is for the wrong issue - it should be posted at #831082: Contextual links appear unstyled on the dashboard configuration screen when you start off with an empty dashboard instead. (And I think your analysis is correct, but I'm not sure about the fix. I thought Drupal's AJAX system is supposed to take care of adding CSS files automatically? It may be that the Dashboard isn't using the standard AJAX system, though.)

The issue here is that the contextual links shouldn't be appearing at all (whether styled or unstyled). Contextual links on a disabled block don't make any sense.

jody lynn’s picture

As long as the contextual links are styled they are not invasive so I don't see why it matters if they appear on the disabled blocks. Maybe some people want to configure the blocks before they place them.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.