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've installed ThemeKey module in my website. Now, I've assigned administrative theme to user-role: EDITOR. So, when the user having this role, logs in, he get an administrative interface. It works fine but when this user chooses to edit something (edit page, edit menu) he moves back to default theme. I want him to have this administrative theme even when editing. Also, I want another theme for this role if the user browser using mobile device.
Comments
Comment #1
mkalkbrennerIf you enable the ThemeKey Debug module you will get detailed information about what is going on.
I guess you enabled the "Administration Theme" for editing content. Turn off the "Administration Theme" feature or enable ThemeKey Compatibility to let ThemeKey control the core "Administration Theme" feature.
But again, if the issue is caused by something else, use ThemeKey Debug and post it's ouput here.
Update to ThemeKey 3.x and use the Bowsecap API integration.
Comment #2
getsuresh401 CreditAttribution: getsuresh401 commentedWell, I've update the module to new one, turned off the 'Administrator theme' for editing content and found that the issue is still there. In 'Theme Switching Rule Chain' I choose user:role = Editor > theme: Admin. Below is the debug details.
ThemeKey Debug Messages
Current theme: default
Skipped rule checking because another module already initialized the theme engine.
Consider to activate the module ThemeKey Compatibility to integrate a different theme switching module into ThemeKey's theme switching rule chain
"admin" is configured as administration theme at admin/appearance. This setting is more powerful than a corresponding ThemeKey rule.
These are the current values of all available ThemeKey Properties. By clicking the value you can start creating a corresponding Theme Switching Rule.
comment:cid
empty
drupal:base_path
/web-demo.createmywebs.com/
drupal:get_q
user/17/edit
drupal:is_front_page
false
drupal:path
no debug information
drupal:path:wildcard
empty
drupal:path_is_admin
true
node:body_format
empty
node:body_summary
empty
node:body_value
empty
node:changed
empty
node:changed_date
empty
node:changed_date_time
empty
node:created
empty
node:created_date
empty
node:created_date_time
empty
node:field__vimeo_username_format
empty
node:field__vimeo_username_value
empty
node:field_contact_address_format
empty
node:field_contact_address_value
empty
node:field_contact_cover_image_alt
empty
node:field_contact_cover_image_fid
empty
node:field_contact_cover_image_height
empty
node:field_contact_cover_image_title
empty
node:field_contact_cover_image_width
empty
node:field_contact_email_format
empty
node:field_contact_email_value
empty
node:field_contact_fax_format
empty
node:field_contact_fax_value
empty
node:field_contact_phone_format
empty
node:field_contact_phone_value
empty
node:field_facebook_url_format
empty
node:field_facebook_url_value
empty
node:field_facebook_username_format
empty
node:field_facebook_username_value
empty
node:field_favicon_description
empty
node:field_favicon_display
empty
node:field_favicon_fid
empty
node:field_flickr_url_format
empty
node:field_flickr_url_value
empty
node:field_flickr_username_format
empty
node:field_flickr_username_value
empty
node:field_googleplus_url_format
empty
node:field_googleplus_url_value
empty
node:field_googleplus_username_format
empty
node:field_googleplus_username_value
empty
node:field_image_alt
empty
node:field_image_fid
empty
node:field_image_height
empty
node:field_image_title
empty
node:field_image_width
empty
node:field_linkedin_url_format
empty
node:field_linkedin_url_value
empty
node:field_linkedin_username_format
empty
node:field_linkedin_username_value
empty
node:field_meta_author_format
empty
node:field_meta_author_value
empty
node:field_meta_description_format
empty
node:field_meta_description_value
empty
node:field_meta_keywords_format
empty
node:field_meta_keywords_value
empty
node:field_options_site_logo_value
empty
node:field_options_slogan_value
empty
node:field_options_website_name_value
empty
node:field_page_cover_image_alt
empty
node:field_page_cover_image_fid
empty
node:field_page_cover_image_height
empty
node:field_page_cover_image_title
empty
node:field_page_cover_image_width
empty
node:field_pinterest_url_format
empty
node:field_pinterest_url_value
empty
node:field_pinterest_username_format
empty
node:field_pinterest_username_value
empty
node:field_site_logo_alt
empty
node:field_site_logo_fid
empty
node:field_site_logo_height
empty
node:field_site_logo_title
empty
node:field_site_logo_width
empty
node:field_slideshare_url_format
empty
node:field_slideshare_url_value
empty
node:field_slideshare_username_format
empty
node:field_slideshare_username_value
empty
node:field_tags_tid
empty
node:field_theme_image_alt
empty
node:field_theme_image_fid
empty
node:field_theme_image_height
empty
node:field_theme_image_title
empty
node:field_theme_image_width
empty
node:field_twitter_url_format
empty
node:field_twitter_url_value
empty
node:field_twitter_username_format
empty
node:field_twitter_username_value
empty
node:field_upload_map_image_alt
empty
node:field_upload_map_image_fid
empty
node:field_upload_map_image_height
empty
node:field_upload_map_image_title
empty
node:field_upload_map_image_width
empty
node:field_vimeo_url_format
empty
node:field_vimeo_url_value
empty
node:field_youtube_url_format
empty
node:field_youtube_url_value
empty
node:field_youtube_username_format
empty
node:field_youtube_username_value
empty
node:language
empty
node:nid
empty
node:promote
empty
node:sticky
empty
node:title
empty
node:type
empty
node:uid
empty
node:vid
empty
path:node_alias
empty
system:cookie
has_js=1
SESS46a0520fe4088f73202ddfaf4ccc0b56=UoYU_D2H-8shewEXIMmXA_ZdO4HkA2-UDmt1LBhM9jc
system:date
2014-04-02
system:date_time
2014-04-02 00:10:23
system:day_of_month
2
system:day_of_week
Wed
system:dummy
dummy
system:host
localhost
system:http_header
Host=localhost
User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language=en-US,en;q=0.5
Accept-Encoding=gzip, deflate
Referer=http://localhost/web-demo.createmywebs.com/user/17
Cookie=has_js=1; SESS46a0520fe4088f73202ddfaf4ccc0b56=UoYU_D2H-8shewEXIMmXA_ZdO4HkA2-UDmt1LBhM9jc
Connection=keep-alive
If-Modified-Since=Tue, 01 Apr 2014 18:38:44 +0000
If-None-Match="1396377524"
Cache-Control=max-age=0
system:https
false
system:month
Apr
system:post
empty
system:query_param
empty
system:query_string
empty
system:random
0
system:referer
http://localhost/web-demo.createmywebs.com/user/17
system:remote_ip
127.0.0.1
system:server_ip
127.0.0.1
system:server_name
localhost
system:server_port
80
system:session
empty
system:time
00:10:23
system:user_agent
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
system:user_browser
Mozilla Firefox 28.0
system:user_browser_simplified
Mozilla Firefox
system:user_os
Windows 7
system:user_os_simplified
Windows
taxonomy:name
empty
taxonomy:tid
empty
taxonomy:tid_and_childs
empty
taxonomy:vid
empty
themekey_simpletest:custom_theme_alter_test
1
themekey_simpletest:global_property_test
1
user:hostname
127.0.0.1
user:language
empty
user:name
editor
user:role
authenticated user
EDITOR
user:uid
17
views:human_name
empty
views:machine_name
empty
views:vid
empty
Comment #3
mkalkbrennerAs you can see, user:role is EDITOR.
But the rules are not evaluated at all:
Turn on ThemeKey Compatibility to see if a different module beside "system" and ThemeKey implements theme switching.
If there's no module that is shown there, we need to search for a module (or your custom code) that erroneously initializes the theme engine.
Comment #4
getsuresh401 CreditAttribution: getsuresh401 commented@mkalkbrenner:
I un-checked the options in themekey/settings/ajax and found that the problem is still exist in following admin pages:
'/admin/people/create',
'/user/17/edit',
admin/people/create',
'admin/structure/menu/manage/main-menu'
when the user having user role 'Editor' visit the above pages, then the theme changes to default one. Rest of the pages are fine.
Comment #5
getsuresh401 CreditAttribution: getsuresh401 commentedI switched on the option 'System (Administration theme)' under 'Modules to become part of the Theme Switching Rule Chain' in themekey/settings/compatibility. Now, it seem to be working fine.
Thanks a lot for the support.
Comment #6
mkalkbrennerYou're welcome.