Jump to:
| Project: | OpenPublish |
| Version: | 6.x-1.x-dev |
| Component: | Admin Interface |
| Category: | support request |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | /admin/build/block, admin access denied, blocks |
Issue Summary
Sudden loss of Admin permission to admin Blocks ("Access Denied").
After spending months learning Drupal and slowly customizing Openpublish to be my dream site, I (admin, user #1) have lost permission to access Blocks.
I can't bear the thought of having to start over.
I get "Access Denied" pages @ /admin/build/block. And "Blocks" doesn't appear on the admin menu.
That's the only problem, I have access to all other Admin functions. Everything else about the site has been great. Seems to work well.
I've read every thread I can find on Drupal.com related to Access Control and permissions. None seem to apply to me. Nearly all either lie dormant, never replied to, or apply to versions 4 or 5 of Drupal.
In Permissions, "Administrate Blocks" is checked for Administrator. I've tried disabling and re-enabling it, rebuilding permissions, clearing cache, giving other Roles the "Admin Blocks" permission and trying it as that role. I've tried disabling all "access control" modules.
The setup:
* Openpublish 2.3 (Drupal 6.20)
* Added modules:
- Discuss_This
- Advanced Forum
- Advanced Profile
- Admin_Role (tried uninstalling this, made no difference)
I'm in so much trouble after taking this long to get my site customized and "just right". I can't go any further without access to Blocks.
Can anyone suggest anything I might look into that might cause something so basic as Blocks (but nothing else) to be denied to the Administrator and User #1 after months of working fine, during development?
Thank you with all my heart,
--Salo
Comments
#1
Have you tried this:
http://drupal.org/node/328183#comment-1126015
#2
Also, you should not use Drupal core "Admin Blocks" for OpenPublish. Admin Blocks interface is too weak for anything complicated, OpenPublish uses Context for aligning blocks instead. You can read more about Context in the documentation:
http://openpublishapp.com/doc/managing-regions-and-blocks-context
#3
#4
>
> "Have you tried this: http://drupal.org/node/328183#comment-1126015"
>
Yes yes, thank you so for responding! I did read that, and meant to mention that among the things I've tried is switching to Garland and making sure that it was enabled and selected, in case the cause was some Block not working in my custom theme, or a theme that's selected but not enabled (code really out to auto-enable when a theme is selected).
I've devoured and contemplated everything that comes up searching "access denied" on Drupal.org, and been searching the web for "admin/build/block" && "access denied", and find nothing.
I'm so distraught. My life is over if I have to restart this from scratch. I can't believe I managed to produce something that no one else in the Universe ever has! I'm an old-school programmer... C++ and Pascal and COBOL and such. I feel like such a dolt here!
Thank you for replying though.
--Salo
#5
>
> Also, you should not use Drupal core "Admin Blocks" for OpenPublish.
> Admin Blocks interface is too weak for anything complicated, OpenPublish
> uses Context for aligning blocks instead. You can read more about Context
> in the documentation:
>
> http://openpublishapp.com/doc/managing-regions-and-blocks-context
>
Oh yes, thank you, I have been able to master Contexts over these months and when Blocks disappeared from the Admin menu, I thought at first, Well I'll just use Views to create Blocks, and Context to place them in pages, but felt that wasn't viable for two reasons: How can I create non-Views Blocks (such as changing or replacing the simple Ad blocks that Openpublish comes with, with just my own simple code in them, rather than a Views display versioned as a block?...
But moreso, it's hard to push on with this lengthy learning-curve site with any confidence that something else will just suddenly become imPermissable to me, like Blocks did, if I don't understand what happened and can't fix it.
Would you go ahead and plan to manipulate blocks by creating Views blocks, and using Context to place them on pages?
Any thoughts about where to look to understand how the Admin account could have no Permissions for such a fundemental thing as Block admin'ing?
Thank you SO much for replying. One feels very "at sea" as a newcomer to Drupal with all the millions of questions posted here that never get answered. I thank you for your time helping a very upset soul out.
Take care,
--Salo
#6
#7
I'm experiencing the same thing. I too have tried enabling, and switching to all themes. the Blocks admin menu item is GONE and if I manually put mysite.com/admin/build/block I get the Access Denied screen. I've tried resetting the menus, everything.
I would just use contexts and whatnot but the problem is that I have blocks in places that I need to change or remove.
Does anyone know how permissions to admin controls are done in the database? What should the data look like? Where are these pages/permissions controlled in the code?
#8
In order to be able to help fix the problem we need to be able to reproduce the problem. You need to provide more details regarding either:
1. Specific steps to reproduce the problem on a fresh OpenPublish installation
2. any event that happened before your blocks administration page disappeared that could be related, which may include: changing some code, installing or uninstalling some module etc.
#9
UB: Check in your database look at the following:
SELECT * FROM yourdb.menu_router m order by path
See how many rows you have containing admin/build/block, I have 16 in my local db (where I have a Blocks link) and 1 in my production db. For the one similiar link, the data in the row is significantly different, too
SELECT * FROM yourdb.menu_links m where link_path like '%admin/build/block%'
Similar, I have several records in the working app's db, and only one in the production broken db
Let me know if yours is the same.
#10
Irakli: Please see my note above. Mine occurred after I reset all of the overriden contexts to default. This was on a darn-near new install (less than 4 days old). I had published a few articles but had not installed any plugins or made any changes besides content. I had created ONE new block for a twitter feed.
#11
Irakli, just wanted to thank you for sticking in there with us.
I'm afraid I've been customizing this OP site for too long, and was focusing on Contexts instead of Blocks so I hadn't had occasion to go change existing Blocks until recently -- I don't know exactly when this happened.
I hadn't just reset all my Contexts like Jerzaki, but I have been heavily changing the Contexts that came with OP.
And I've been working hard on building an OP sub-theme that looks completely differently, but this is occurring in Admin themes like Garland, and others I've tried.
I've only installed a few more modules than the default OP ones, which I mentioned above, but everything has been working fine, there's been no indication of another problem.
Isn't there a place where ultimately the software is checking, to determine that I should have no permissions to admin Blocks, that I could check, or change, in the database? I have a technical background, but I'm afraid that Access Control permissions, and how modules might be altering them, is over my head at this point of working to master Drupal.
But it seems like there should be a place were I could manually change a bit of data to force a basic Permission like that to be allowed to the Admin?
Thank you for ANYTHING that pops into your head to try.
On the other hand, is there another way I could create, say, a Block that just contains a PHP code snippet, for example so I could create my own simple Block and include it in a Context to display it? That's what I have to be able to do, what makes me feel I can't live with just using Context instead of core Block management.
Thanks again,
--Salo
#12
>
> UB: Check in your database look at the following:
>
>SELECT * FROM yourdb.menu_router m order by path
>See how many rows you have containing admin/build/block, I have 16 in my local db (where I have a Blocks link) and 1 in my >production db. For the one similiar link, the data in the row is significantly different, too
>
>SELECT * FROM yourdb.menu_links m where link_path like '%admin/build/block%'
>Similar, I have several records in the working app's db, and only one in the production broken db
>
>Let me know if yours is the same.
>
Yes! I am experiencing the same thing!
In the site with broken Admin permissions for Blocks, there is only one entry with a link_path containing "admin/build/block".
In a test OP site, which I haven't customized as much, there are 3 additional entries in "menu_links" that contain "admin/build/block":
admin/build/block/configure
admin/build/block/delete
admin/build/block/list/js
...and as you said, in the test site where Blocks *is* accessible, the data in the entry for "admin/build/block" is much different. For example, P1 through P9 contain:
114 123 130 0 0 0 0 0 0
but in the same row in the database of the site that's broken the permission to admin Blocks, they're:
5552 5559 5566 0 0 0 0 0 0
The OPTIONS field, and most others, are the same EXCEPT I do note that in the broken site, LINK_TITLE is *blank*, whereas in the unbroken test site, LINK_TITLE has the value "Blocks".
Have you dared change the data in your database for the site you're trying to salvage?
Could it be as simple as Drupal not letting us into "admin/build/block" because there is no link_title field filled in for it to stick into the Admin menu?
Curiouser and curiouser...
--Salo
#13
But no, of course it couldn't be that simple. Updating the "link_title" field from blank to "Blocks", then rebuilding permissions and rebuilding the admin menu, still "Access Denied" trying to get to "admin/build/block".
But I think you're on to something!
#14
I'm certainly no Drupal expert, but perhaps something happened which caused essential db rows which control blocks to be removed. Perhaps this isn't a permission issue at all, but an application issue and the error is being handled as a permission denied?
I'm dying to get this worked out.
I have tried changing some data, but to no avail. I'm hesitant to do it because I don't know what the process did to put the data there or remove it and I'd hate the screw up the integrity of the db in addition to whatever else as happened.
#15
UB! I got mine back. See if this works for you:
DEVEL > Other Tools > Reinstall Modules
** WARNING ** I have NO IDEA what the repercussions of this are as far as customizations, but I haven't seen any blocks disappear or anything, but please BACK UP YOUR DB BEFORE YOU DO THIS
Select the following modules
- admin
- blocks
- ALL OF THE context modules
(I also did menus and ckeditor, but that wasn't because of this)
the Blocks item came back, and all of the "missing" db entries are back....
Enjoy!
#16
SWEET JEBUS!
It did work!
You know, I was kind of on that track, in that I'd thought of disabling the Blocks module to then uninstall and re-install it, but you can't disable it on the Modules page. I should have remembered the Devel re-install tool.
You're a genius! Brilliant. I can't thank you enough!
I think this is the only actual success story among all the support requests for Drupal and OP problems with Admins loosing permission to do things, that's come up with a working answer!
THANK you, my brother! Many weeks of my life saved for not having to start over.
I owe you a beer!
Swooning,
--UB
PS: And thank you to you other guys that took a shot too, appreciate your time!
#17