Hi.
I have been using version 1 with no problems. After I upgraded to current 6.x-2.0-beta6, ThemeKey stopped working. All my rules I have set are not working at all, theme isn't switched. No problems or errors reported anywhere in drupal, neither in Apache log. I tried completely disable and uninstall module, clear all site caches, cleaned database manualy of all themekey entries, than I installed module again, but still no go. I tried to install ThemeKey Properties module, turned on Debug mode, but again, all is set up correctly, but theme isn't switching.
Any ideas please?
Thanks a lot.
Comments
Comment #1
mkalkbrennerWhich ThemeKey 6.x-1.x version did you use exactly?
Please provide a screen shot of your current rules.
Comment #2
lakyljuk commentedHello.
Thanks for a reply. I was using ThemeKey 6.x-1.2beta7 before, upgraded and rules stopped working. Even I did everything I wrote in previous post, I couldn't make it work. It is strange, that no errors are reported anywhere, not in drupal log, not in Apache webserver log. I disabled all ThemeKey modules, uninstalled them, deleted them, flushed all caches, removed all ThemeKey traces from database and then did clean install of latest version 2 beta, set rules again, but still nothing. Theme I would like to switch to, is functional and I can change to this theme in my user profile, so I know it is working. Screenshot attached. I set rules with help of ThemeKey Properties Debug, but it didn't helped.
Thanks for your time.
Comment #3
mkalkbrennerComment #4
mkalkbrennerUnder some circumstances debug messages cause ThemeKey to not switch a theme.
Please update to ThemeKey 6.x-2.0-beta7 and ThemeKey Properties 6.x-2.0-beta2.
If theme switching now works ... perfect.
Otherwise turn on a new debug feature called "Trace ThemeKey rule switching" and post a screen shot of a page you expected to use a different theme.
Comment #5
lakyljuk commentedHello.
Thanks for a new versions and quick reply. Unfortunately it isn't working for me. I have disabled, uninstalled previous versions of ThemeKey and ThemeKey Properties and installed latest beta as you suggested. Set up rules again. It had no effect, theme is not switched. Then I turned on Debug mode and displayed page which was supposed to be in different theme. Theme was not changed, but two messages from Debug mode were displayed:
* ThemeKey Debug: Match: "drupal:path = taxonomy/vocabulary/34 >>> newsflash"
* ThemeKey Debug: Switching theme to newsflash.
But as I said - theme is not switched. Is it possible, that ThemeKey is in conflict with some other module? I cannot think of any, which could cause this.
Thanks
Lukas
Comment #6
mkalkbrennerOK, ThemeKey itself works:
"ThemeKey Debug: Switching theme to newsflash."
I guess that another module calls init_theme() before ThemeKey sets the $custom_theme.
If you want to we can find out what happens. If you apply the attached patch to includes/theme.inc it will print some debug output just for the site administrator which you should post here.
Comment #7
lakyljuk commentedThanks.
Applied patch and here is the output, when accessing page which should be switched theme (and is not):
#0 init_theme() called at [/data/www/1zsfm.cz/www.1zsfm.cz/includes/theme.inc:594]
#1 theme(insertFrame_init) called at [/data/www/1zsfm.cz/www.1zsfm.cz/sites/all/modules/insertFrame/insertFrame.module:20]
#2 insertFrame_init()
#3 call_user_func_array(insertFrame_init, Array ()) called at [/data/www/1zsfm.cz/www.1zsfm.cz/includes/module.inc:483]
#4 module_invoke_all(init) called at [/data/www/1zsfm.cz/www.1zsfm.cz/includes/common.inc:2612]
#5 _drupal_bootstrap_full() called at [/data/www/1zsfm.cz/www.1zsfm.cz/includes/bootstrap.inc:1078]
#6 _drupal_bootstrap(8) called at [/data/www/1zsfm.cz/www.1zsfm.cz/includes/bootstrap.inc:989]
#7 drupal_bootstrap(8) called at [/data/www/1zsfm.cz/www.1zsfm.cz/index.php:16]
* ThemeKey Debug: Match: "drupal:path = taxonomy/vocabulary/34 >>> newsflash"
* ThemeKey Debug: Switching theme to newsflash.
Comment #8
mkalkbrennerModule insertFrame causes the trouble. It calls
theme('insertFrame_init')within it's implementation ofhook_init().That's not allowed in Drupal 6:
http://drupal.org/node/219910#comment-1254086
This also breaks Drupal 6 core functionality to set an administration theme.
Comment #9
mkalkbrennerComment #10
MarcElbichon commentedTo workaround, comment line 43 :
Comment #11
lakyljuk commentedHello.
Thank you guys, problem solved, theme is now switching flawlesly and insertFrame is still working too, after commenting that line out.
Comment #12
MarcElbichon commentedThemeable function in hook_init() will be removed in future version.
Custom javascript would be added in insertframe.js