Magento Enterprise Full Page Cache Issue When Switching Theme

Funny little problem this one. Magento Enterprise 1.11 does not use the theme name as part of the FPC uri. Therefore when switching themes within a package using the design exceptions you still see the cached version of the site. This is obviously a major issue when you're using the design exceptions to load a mobile theme.

Solution

Pretty straightforward, add the theme name to the FPC uri. It doesn't need much explaining so grab the source on Github.

Comments

Permalink

Thank you a lot, you are genius, dude :)

Permalink

This isn't working with EE 1.9 unfortunately. I can't seem to find any `_createRequestIds` function; I don't think it exists in 1.9 so can't be overwritten. I tried transplanting your code into Enterprise_PageCache_Model_Processor but it didn't work either. It seems like I'm missing something extremely simple! Any ideas, please?

Permalink

Hi Joe,

Sorry but I don't have a copy of EE 1.9 to test this. Basically all it does is add the theme key to the cache key. If you manage to get it working, create a pull request and i'll merge it in.

Permalink

I opened up Enterprise_PageCache_Model_Processor (visible here: http://paste2.org/s82y2p95) and tried to add the theme name to the cache URI but calling "getTheme('frontend')" (which I was doing around line 94) simply results in a Magento 404 page - even if I just try to silently log the value. Probably there's an exception or something (I haven't had time to debug).

Looking at the file's source above, is that the right approach, do you think?

Thanks.

Permalink

The Magento support team were able to provide a patch for 1.9 called "SUP-2028_EE_1.9.0.0_v7.patch" which fixed the issue. Anyone with the same issue should contact them with your version number. Thanks for your help.

Permalink

Joe,

Glad you found your solution. How about posting the patch for other users who land here?

Permalink

Hi. What about CE version? Im using full cache extension on CE version and facing same issue. would this extension work on CE version??
Thanks

Permalink

Couldn't say without testing it.

Permalink

Hi Ben. Thanks for reply..
Can I test it on live site?? will it effect the database or website structure?? in case it causes any problem can I deactivate it easily?

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.