Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to stop my blocks admin pages from being rendered in the admin theme (garland) since this is causing me no end of hassle having to re-assign blocks to my custom theme's region (based on the 'basic' theme).
admin_theme doesn't pay any attention to paths I put into the
"Do not use administration theme on the following pages.:"
section.
I've tried to exclude the following paths. . .
- admin/build/block
- /admin/build/block
- admin/build/block*
- /admin/build/block*
- admin/build/block/*
- /admin/build/block/*
. . . nothing works to stop the blocks admin pages from being rendered in the admin theme.
Comment | File | Size | Author |
---|---|---|---|
#27 | administration_theme-excluded-paths-ignored-554324-26.patch | 586 bytes | B-Prod |
#10 | 554324-2.patch | 699 bytes | davyvdb |
#8 | 554324-1.patch | 820 bytes | davyvdb |
Comments
Comment #1
davyvdb CreditAttribution: davyvdb commentedhttp://drupal.org/node/382990
Comment #2
austintnacious CreditAttribution: austintnacious commentedHi Davy!
This is NOT a duplicate, in fact its an exact opposite.
The comment you referred me to is requesting as a feature what I am describing as a problem.
The thread you refer to does not describe a fix for my problem!
I want to be able to use admin_theme for most of my admin pages but want to render my blocks page in my custom theme.
My custom theme (based on "Basic") and my admin theme (Garland) have different drupal regions.
If I try to EXCLUDE my blocks admin pages from the admin theme, using admin_theme.module's exclude text field the paths I enter are ignored. . . that is my blocks admin pages are rendered in the admin theme not my custom theme.
Comment #3
davyvdb CreditAttribution: davyvdb commentedThis is only true on admin/... pages. It has to do with this issue : http://drupal.org/node/508536
Now core administration theme feature can take over again.
Since I fixed that one, this one's in. Let me think about how to solve this.
Comment #4
davyvdb CreditAttribution: davyvdb commentedHow about
Comment #5
austintnacious CreditAttribution: austintnacious commentedHi Davy!
I'm not a programmer so I can't really help you in terms of how good the code is.
If you present it in patch form I'll be happy to manually patch admin_theme and let you know if it works for me. . . but without the patch format I don't know what to do with the code snippet you've provided. . .
Thanks!
Comment #6
codesmithI'm having this same problem with the theme for add/edit forum topics. I want to use the admin theme for add/edit *except* for forum pages. I've tried *forum*, forum/*, and others but doesn't work. So seems to be bigger than just admin/ unless I'm missing something.
And actually 'access admin theme' isn't even turned on for the user role I was testing with so they shouldn't be getting the admin theme anyway, right?
Comment #7
davyvdb CreditAttribution: davyvdb commentedIndeed. It's on the default Drupal administration theme paths. Content editing en admin/ pages.
Comment #8
davyvdb CreditAttribution: davyvdb commentedPatch.
Comment #9
vlooivlerke CreditAttribution: vlooivlerke commentedSame Problem
Want to exclude admin/build/blocks
But it does not do its job
This work perfect in 1.1 and I had to revert back on my production site.
I have a role "admin" with the right to access admin theme and blocks
Blocks are theme specific and if you keep seeing the admin theme when administering blocks you will only be able to manage the admin theme block regions.
By default the admin theme should not be enabled when managing blocks
Comment #10
davyvdb CreditAttribution: davyvdb commented@VlooiVerke : Have you applied the patch?
Provided is a new patch based on http://us2.php.net/manual/en/function.unset.php
Unsetting global variables only works for the local instance. To unset them you should use $_GLOBALS.
Have a look at this patch and tell me what you think.
Comment #11
vlooivlerke CreditAttribution: vlooivlerke commentedcool Patch works
Thanks
Comment #12
vlooivlerke CreditAttribution: vlooivlerke commentedSpoke too soon
Now if i go to admin/build/blocks a see my first block theme "Garland"
But if a go to the next theme minelli (build/block/list/minnelli) it shows the "garland" theme
I turned on over 6 themes and never mind where I click on block management per theme (build/block/list/*theme) it keeps showing garland
Both patches dont work and give the same effect as described above
Comment #13
davyvdb CreditAttribution: davyvdb commentedAlright. So this is another issue.
Let me repeat : "Your admin theme is garland, your default theme is something else. If you go to admin/buidl/block for your default theme, the admin theme is appearing." How have you configured admin theme? Have you installed any other modules that mingle with themes? Because I can not reproduce this.
Comment #14
vlooivlerke CreditAttribution: vlooivlerke commentedMy installation
Admin theme "Basic"
Other active themes "Garland" and "minelli" and "4 more themes"
Admin theme settings:
Do not use administration theme on the following pages.:
admin/build/block
admin/build/block/list/*
Now
When i visit admin/build/blocks it shows the first theme "Garland" and not my "Basic admin theme" cool, but not coz if i visit the next active theme minelli (admin/build/list/minelli) it keeps showing "garland" and it will show garland for all
Comment #15
davyvdb CreditAttribution: davyvdb commentedCan you remove?
Do not use administration theme on the following pages.:
admin/build/block
admin/build/block/list/*
That should not be necessary.
Comment #16
vlooivlerke CreditAttribution: vlooivlerke commentedNow it shows my "basic admin theme" on all admin/build/block pages
Comment #17
davyvdb CreditAttribution: davyvdb commentedYou have any other modules doing something with themes? Do you mind sending me a zip/tarball with all the code of your installation?
Comment #18
vlooivlerke CreditAttribution: vlooivlerke commentedThe only theme related i can think off is
Rootcandy Admin theme
Region Manager
Hope this helps
Comment #19
davyvdb CreditAttribution: davyvdb commentedI've installed Region Manager and I can reproduce the bug now. I can even remove admininistration theme and I still have the bug. This module is calling init_theme. So this is a bug in this module.
Comment #20
vlooivlerke CreditAttribution: vlooivlerke commentedPosted bug report here for Region Manager: http://drupal.org/node/465052#comment-1951920
Comment #21
q0rban CreditAttribution: q0rban commentedDavy, thank you for putting the time in testing this, but I'm confused. How is calling init_theme() a bug?
Comment #22
davyvdb CreditAttribution: davyvdb commentedWell, I've checked it out. Removing init_theme from your module solved the issue with the block administration page here described. Maybe you should check with the theme system writers?
Comment #23
codesmith554324-2.patch solved my problem. If path is in exclude list, default theme is shown. If user does not have 'access admin theme' permission, default theme is shown. Many thanks.
Comment #24
chriscalip CreditAttribution: chriscalip commentedMaybe this would help .. i usually just make a page-admin-build-block.tpl.php on the default theme...
Comment #25
Melissamcewen CreditAttribution: Melissamcewen commentedDid this patch ever get committed? I am have this problem and I'm not using region manager.
Comment #26
Melissamcewen CreditAttribution: Melissamcewen commentedComment #27
B-Prod CreditAttribution: B-Prod commentedActually the disallowed paths are ignored when using the short URL. The patch below fixes such issue.
For those who do not want the admin theme to appear on node/*/edit or node/*/revisions pages, take care to not check "Content editing" option, because the system module will take over the administration theme module.
Comment #28
brad.bulger CreditAttribution: brad.bulger commentedThis last patch doesn't work for me, but the one in #1227704: Cannot set admin theme to not show for user page does.