Closed (fixed)
Project:
Drupal core
Version:
7.7
Component:
block.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
28 Jun 2009 at 12:41 UTC
Updated:
2 Nov 2012 at 19:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
BarisW commentedThis happens on admin/build/block
Comment #2
BarisW commentedComment #3
akahn commentedI 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.
Comment #4
fgmIt 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.
Comment #5
fgmErroneous 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..
Comment #6
akahn commentedImproved 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.
Comment #8
akahn commentedI think that error is due to having an out of date checkout. Updated to HEAD and rerolled.
Comment #9
akahn commentedComment #10
HedgeMage commentedJust tested, and it looks good to me.
Comment #11
dave reidI think it would really make more sense to do this:
or at least put the user_access() in the same if condition.
Comment #12
dave reidConfirmed that this fixes it in the same manner. Why not re-use the result of user_access that is provided to us? :)
Comment #13
dave reidScreenshots of the admin/build/block page to show what the problems was and how it is fixed now.
Comment #14
akahn commentedI like Dave Reid's change. Much more elegant. I think this is ready to go.
Comment #16
Bojhan commentedMr.Bot?
Comment #17
dropcube commentedAlso, 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'Comment #18
dropcube commentedThe 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.
Comment #20
dropcube commentedRe-rolling patch against HEAD.
Comment #21
akahn commentedPicking 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.
Comment #22
dropcube commented@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.
Comment #24
dropcube commentedRe-roled against head, same approach.
Comment #26
Tor Arne Thune commentedThis is fixed in Drupal 7.0.
Comment #27
ljmarik commentedI 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.
Comment #28
yoroy commentedljmarik: have you seen and clicked the 'Demonstrate block regions' link in D7 yet?
Comment #29
Argus commentedComment #30
ljmarik commentedyoroy: Yes, I figured it out. I had to turn on the "System Help" block. Somehow this block was disabled. Thank you for the response!
Comment #31
ewenss commentedThis 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