Closed (fixed)
Project:
ThemeKey
Version:
6.x-3.0
Component:
Code / API
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 May 2010 at 16:57 UTC
Updated:
17 Oct 2010 at 23:07 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
francewhoaComment #2
mikeytown2 commentedSubscribe for tracking purposes.
If you can use something like domain access to set a different theme per domain that would be ideal.
Does themekey work with the core page cache?
How does theme key keep track of the user selection?
Code that might be useful depending on how the user selection is tracked.
http://drupal.org/node/646228#comment-2320296
Edit: Francewhoa, Can you describe in detail what you wish would happen and what happens in reality?
Comment #3
francewhoaThanks for asking mikeytown2. I'm happy to clarify.
Here is a scenario that describe in detail what I wish would happen.
admin/settings/performance/boostBoost'sHTML - Default maximum cache lifetimeis set to 1 week.admin/settings/themekey/propertiesThemekeyTheme Switching Rule Chainis set to switch to the following themes.Garland on Monday
Pushbutton on Tuesday
And so on with a different theme every day.
I tried above scenario but it doesn't work when Boost is activated. It does work when Boost is deactivated though.
When Boost is activated what happen in reality is at step 4 Garland theme is display. What I wish is display Pushbutton on Tuesday to anonymous users.
Let me know if you have any other questions.
Comment #4
francewhoaTo try to isolate the source of the issue I did two tests using above scenario in #3. Both with Boost activated. Here are the results.
Test 1: If the 'content' of a page is updated then Boost clear its cache. Then the updated page content is display. And the theme is switch. Boost already does that very well :)
Test 2: If the 'content' of a page is NOT updated then Boost does NOT clear its cache. This is normal and expected. But the issue is that the theme does NOT switch.
So it seems that current Boost is able to detect when the content of a page is updated. But NOT able to detect when Themekey switch the page's theme.
Comment #5
mkalkbrennerThe problem described here is not specific to boost. It also affects drupal's internal page cache, varnish, memcache and anything else that works as a page cache for anonymous users.
In think the only reliable way to automatically clear the page cache is hook_cron().
I'm not yet sure if we should do some magic depending on the time based themekey properties. Maybe if it's a better approach to keep that independent from the the switching rules and clear the cache every hour, day, week or a special date like 2010-12-24 00:00:00.
I put this on the ToDo list ...
Comment #6
francewhoaThanks mkalkbrenner.
I'm not a coder so I'll let others handle it. Any volunteer for a patch? I'll be happy to contribute testing and documentation.
Comment #7
mkalkbrennerBetter compatibility to caches will require some more changes to ThemeKey. So I move this issue to ThemeKey 6.x-3.0 where we'll have the chance of alpha and beta releases.
Comment #8
mkalkbrennerComment #9
mkalkbrennerThemeKey 6.x-3.x-dev now clears the page cache (using the quick truncate method) every time you modify the theme switching rule chain. That already fixes the problem for some use cases but not for time based properties like Francewhoa described.
Comment #10
mkalkbrennerThese features are included in ThemeKey 6.x-3.0-alpha1
Please test this release and provide some feedback especially with external caches like boost or varnish.
Comment #11
francewhoaAwesome. Thanks mkalkbrenner :) I'll test for Boost then post my result here.
Comment #12
mkalkbrennerThemeKey 6.x-3.0-alpha1 contained a critical bug that cause most of the properties not to work. So please try ThemeKey 6.x-3.0-alpha2.
Comment #13
francewhoaOk. Thanks for letting us know :)
Comment #14
francewhoaI tested ThemeKey 6.x-3.0-alpha2 but issue is still present. I tested various configurations with Boost and Themekey but same results as #3.
Tested with:
*ThemeKey 6.x-3.0-alpha2
*Boost 6.x-1.18
*Drupal 6.16 fresh install
I noticed that
admin/reports/updatesandadmin/build/modulesboth displayThemeKey Properties 6.x-2.0. Is this normal? Find screenshoots to clarify (admin-reports-updates.png and admin-build-modules.png)Find other attached screenshoots to clarify Themekey and Boost's settings.
Comment #15
mkalkbrennerYou need to install ThemeKey Properties 6.x-2.1 which supports the cron introduced in ThemeKey 6.x-3.0.
Comment #16
Lloyd commentedI know this is a tough question to answer, but how stable is 6.x-3.0? I'm going to be installing this on a site for the first time. Boost is in use so I'm intriguted with this new version. I know that there's no guarantee that things will work as expected, but would you yourself install this version on a production site at this point?
Thanks for making this module. In about 30 seconds of googling I found this perfect solution to a problem I just found out about.
Comment #17
mkalkbrenner@ #16 Lloyd:
Unlike some other contrib developers I'm releasing alphas, betas and release candidates if I change something in the architecture of a module.
In this case the architectural change is not that big and 95% of the code is identical with ThemeKey 6.x-2.x. According to the usage statistic 17 sites are already using ThemeKey 6.x-3.x.
As soon as someone confirms that this issue is fixed I will declare ThemeKey 6.x-3.0 as beta for some time and wait if someone runs into a bug.
So from my point of view the development phase of ThemeKey 6.x-3.0 is done and you can give it a try.
Comment #18
Lloyd commentedPerfect answer. I've got it installed, so far no issues. Thanks.
Comment #19
mkalkbrennerComment #21
francewhoaConfirming that ThemeKey 3.0 fixed the issue with Boost cached pages. Thanks all :)
If ThemeKey isn't working then ensure your cron run frequently enough. There is a friendly reminder about that at
/admin/settings/themekeyat the top of the page in a yellow box. In other words the theme will be change only on cron run.Tested using
*ThemeKey 6.x-3.0
*ThemeKey Properties 6.x-2.3
*Boost 6.x-1.18
*Drupal 6.19