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.
Hi!
I don't want the admin theme showing on the user and user edit pages.
I have tried:
user*
user/*/edit
users*
and nothing works.
There was a ticket raised for version 6 that was very similar, but that solution doesn't work for version 7/
Any help would be great!
Comment | File | Size | Author |
---|---|---|---|
#22 | admin_theme-1227704-22.patch | 568 bytes | Ada Hernandez |
Comments
Comment #1
dgastudio CreditAttribution: dgastudio commentedsame here, doesnt work for user edit pages.
Comment #2
tinny CreditAttribution: tinny commentedI have the same problem but for content editing pages.
If i check
Pages > Content editing
and inCustom > Do NOT display on following > node/add/type
the admin theme still shows on the page node/add/type
even though it says If a path appears here, the administration theme is not shown even if all above options apply.
I got around this by
1. unchecking Content editing
2. use admin theme on node/add/*
3. do not use on node/add/type
also, no admin theme on user/* doesnt work for me either.
Comment #3
denny84 CreditAttribution: denny84 commentedDo one thing. You will not need this module to overcome this problem. This solution will work for all users except user #1.
1. Create a new user role at
admin/people/permissions/roles
namelySub Administrator
or something meaningful.2. Go to
admin/people/permissions/list
and look for the permissionView the administration theme
3. Uncheck that for all roles (it will already be unchecked by default).
4. Give appropriate permissions to the new
Sub Administrator
and perhaps to other user roles as well, depending on your requirements.Thats it now all the administrators and authenticated users will have normal theme instead of admin theme, except user 1. This could be bug only. But if
user 1
bug works for you then may I did something wrong.Comment #4
tonessss CreditAttribution: tonessss commenteduser* works if the permissions are set correctly for Anonymous User:
Comment #5
sepph CreditAttribution: sepph commentedHi,
I was having the same issue.
You might find you need to uncheck the View the administration theme permission option under System. It looks as though it overrides anything you set using the Administration Theme module.
I unchecked this option. Then set Use administration theme on the following pages to admin/* and Do not use administration theme on the following pages to user/* and this allowed me to use the site theme on the user/*/edit pages.
It doesn't work for user 1 though as they've got all rights granted I believe... which can trip you up when developing. Try using another user account.
Hope this helps.
Comment #6
benys CreditAttribution: benys commentedDrupal 7 intruduce hook_admin_paths() to detect admin paths.
I implemented hook_admin_paths_alter to override admin paths.
Comment #7
jordi_bcktt CreditAttribution: jordi_bcktt commentedWorking for me. Thanks.
Comment #8
marcvangendI'm not sure if #6 is the best solution. Instead of implementing another hook, let's try to keep the logic in a single place. It looks like problems like this can be prevented by explicitly returning the default theme name when $admin_theme_disallow is true.
So around line 148 of admin_theme.module you would get:
Comment #9
marcvangendOn second thought, maybe #6 is the better solution. This is untested... but I guess that if you force the default theme without altering the admin paths, then Overlay module will try to render pages with the default theme inside the overlay.
Comment #10
heylookalive CreditAttribution: heylookalive commentedPatch on #6 works for me!
Comment #11
asak CreditAttribution: asak commentedYep - #6 works like a charm.
Comment #12
willieseabrook CreditAttribution: willieseabrook commented#6 works for me. That make 3 confirmations by community. Setting to RTBC
Comment #13
heylookalive CreditAttribution: heylookalive commentedWorks for me, can we commit?
Comment #14
sgabe CreditAttribution: sgabe commentedPatch in #6 works for me too.
Comment #15
Scott Robertson CreditAttribution: Scott Robertson commented#6 works for me as well.
Comment #16
imclean CreditAttribution: imclean commentedWorks for me. Updating version.
Comment #17
imclean CreditAttribution: imclean commentedMay need some testbot action first.
Comment #18
kalistos CreditAttribution: kalistos commentedRenamed patch file name.
Comment #19
lodey CreditAttribution: lodey as a volunteer commented#18 worked well for me. It would be useful to have it in the dev version at least.
I'd say this is the most common reason for using the module I come across - i.e. the 'user' page is part of the main site - even for admin users.
Comment #20
joshmillerComment #21
drupalfan2 CreditAttribution: drupalfan2 as a volunteer commentedIs this patch still necessary for latest Drupal 7 version?
Comment #22
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commented#18 doesn't apply to 7.x-1.1, so creating a new one but any change done.
Comment #24
justy CreditAttribution: justy at TrazerEdge commentedRolled up this patch to the latest dev version.
Comment #25
justy CreditAttribution: justy at TrazerEdge commented