Comments

BarisW’s picture

This happens on admin/build/block

BarisW’s picture

Issue tags: +Access denied, +D7UX
akahn’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

I can confirm this bug.

Here's a patch that adds a user_access('administer blocks') check to the part of block_page_alter that adds the dotted-line region label to each region.

fgm’s picture

Status: Needs review » Needs work

It is not sufficient: any page below that one (like admin/build/block/akahn) will also display the regions. You need to match the path more generally.

fgm’s picture

Status: Needs work » Needs review

Erroneous comment of mine, canceling. There's just a tiny performance issue with keeping user_access within the foreach loop. Not much, as it has static caching, but still..

akahn’s picture

StatusFileSize
new1.38 KB

Improved patch. Thanks to osinet for pointing out that the user_access check should be inside the path check, so that it doesn't get run on every single page ever, just on admin/build/block.

Also added a bit of documentation explaining the call to user_access.

Status: Needs review » Needs work

The last submitted patch failed testing.

akahn’s picture

StatusFileSize
new1.16 KB

I think that error is due to having an out of date checkout. Updated to HEAD and rerolled.

akahn’s picture

Status: Needs work » Needs review
HedgeMage’s picture

Status: Needs review » Reviewed & tested by the community

Just tested, and it looks good to me.

dave reid’s picture

Status: Reviewed & tested by the community » Needs work

I think it would really make more sense to do this:

if ($item['path'] == 'admin/build/block' && $item['access']) {

or at least put the user_access() in the same if condition.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new803 bytes

Confirmed that this fixes it in the same manner. Why not re-use the result of user_access that is provided to us? :)

dave reid’s picture

StatusFileSize
new79.69 KB
new50.8 KB
new59.85 KB

Screenshots of the admin/build/block page to show what the problems was and how it is fixed now.

akahn’s picture

Status: Needs review » Reviewed & tested by the community

I like Dave Reid's change. Much more elegant. I think this is ready to go.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

Bojhan’s picture

Status: Needs work » Needs review

Mr.Bot?

dropcube’s picture

Title: Regions are displayed on Access Denied page » Regions highlights are displayed incorrectly
Status: Needs review » Needs work

Also, if you go to admin/build/block/list/stark or the block admin page of any other theme, the regions highlights are not displayed due to: $item['path'] == 'admin/build/block'

dropcube’s picture

Status: Needs work » Needs review
StatusFileSize
new1.52 KB

The patch decide whether to append region description by checking the page_callback of the menu item and the access property. It improves performance by moving the check out the foreach.

Status: Needs review » Needs work

The last submitted patch failed testing.

dropcube’s picture

Status: Needs work » Needs review
StatusFileSize
new1.38 KB

Re-rolling patch against HEAD.

akahn’s picture

Status: Needs review » Fixed

Picking this up again.

I just updated to HEAD and it appears that this patch is no longer necessary. When logged-out, going to admin/structure/block gives me the access denied page, with no region highlights. Can someone verify this? Change the status back if I'm mistaken.

dropcube’s picture

Status: Fixed » Needs review

@akahn: The issues is still there.

Also, if you go to blocks configuration page of any other theme than the default theme, the regions highlights are not displayed.

Status: Needs review » Needs work

The last submitted patch failed testing.

dropcube’s picture

Title: Regions highlights are displayed incorrectly » Block configuration page doesn't show highlighted block regions for non-default themes
Assigned: Unassigned » dropcube
Status: Needs work » Needs review
StatusFileSize
new1.63 KB

Re-roled against head, same approach.

Status: Needs review » Needs work

The last submitted patch failed testing.

Tor Arne Thune’s picture

Status: Needs work » Closed (fixed)

This is fixed in Drupal 7.0.

ljmarik’s picture

Version: 7.x-dev » 7.7
Status: Closed (fixed) » Needs review
StatusFileSize
new69.09 KB

I am not sure I am posting this correctly. Hopefully I am. I still don't see the highlighted blocked regions in Drupal 7.7 like I do in Dupal 6. Is there something that I am doing wrong or is it still a bug. I will try to attach a screenshot of the issue.

yoroy’s picture

ljmarik: have you seen and clicked the 'Demonstrate block regions' link in D7 yet?

Only local images are allowed.

Argus’s picture

Status: Needs review » Closed (fixed)
ljmarik’s picture

yoroy: Yes, I figured it out. I had to turn on the "System Help" block. Somehow this block was disabled. Thank you for the response!

ewenss’s picture

This is a apparently NOT fixed in Drupal 7. Very frustrating and means I simply cannot use Drupal. :(

See screenshot at http://img560.imageshack.us/img560/6058/drupalbug.png