Magento - full page cache causes design exceptions (multiple themes) to not work correctly

StackOverflow https://stackoverflow.com/questions/19651862

  •  01-07-2022
  •  | 
  •  

Question

I'm running Magento Enterprise Edition v1.9.0.0 and have discovered that you cannot use the Full Page Cache with multiple themes controlled by design exceptions (i.e. User-Agent strings).

The cache does not take into account the theme name, and serves up the page with whatever theme it was first cached with. This means that desktop users could see a mobile theme or vice versa.

I discovered there is a fix for EE v1.11 which simple adds the name of the current theme to the FPC URI (thus creating a cached copy of the page for each theme in use), but it does not work on v1.9.

It tries to override a function called _createRequestIds which apparently does not exist on 1.9. I also tried to put the code from the fix into my 1.9 processor, at Enterprise_PageCache_Model_Processor but I couldn't fetch the current theme name for whatever reason.

So -- is there a way to use the FPC on 1.9 with multiple themes / design exceptions?

Or, alternatively, can anyone hack the 1.9 Enterprise_PageCache_Model_Processor to add the current theme name to the URI string before it's cached?

Was it helpful?

Solution

The Magento support team provided a patch, SUP-2028_EE_1.9.0.0_v7.patch, which fixed the issue for 1.9 by making design exceptions part of the cache ID.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top