We have for example three blocks in the first sidebar navigation, search-form and main-menu. But except of those three blocks we have set login-form block to be displayed on the first sidebar too. The difference with the login-form block is that when the admin is logged in the login-form there is on the sidebar but admin has no access to see it. So the block is invisible. The visible ones are navigation, search-form, main-menu and are displayed by this order.
The problem occurs when we click the ‘move down’ contextual link of the last block(in our example main-menu) and then we click the ‘move up’ contextual link of the same block. In this case the block disappears due to the invisible login-form block. I happens the same with the search-form block that now has been the last one(after main-menu has disappeared).
Comment | File | Size | Author |
---|---|---|---|
#2 | bud-fix-for-permissions-2000732-0.patch | 1.3 KB | avlachaki |
Comments
Comment #1
avlachaki CreditAttribution: avlachaki commentedComment #2
avlachaki CreditAttribution: avlachaki commentedThe problem here was the query that returns all these blocks that are in the region of the block we want to move. Including the invisible ones.
Instead of this we made a simple query to get the region of the block and then we used block_list function to get all the blocks of a specific region for the current user only. So we have in an array only the blocks of a region that the current user(admin in our case) can see.
Comment #3
PolThanks ! Committed and fixed.
Comment #4
xxronis CreditAttribution: xxronis commentedGood stuff