I am trying to hole punch a Magento having two websites setup for retail and wholesale with Varnish 4. So far I have fixed the header section not appearing error by fixing the Main Navigation provided by Smartwave Porto theme. But on wholesale site for Home page and Category pages header seems to work fine. But the product detail page shows ESI processing not enabled error in place of global_messages, messages and top.links block.
I have already tried solutions suggested in some other threads like -p esi_syntax=0x2
Technology Specifications are: CentOs6, Nginx, Varnish 4, Magento 1.9.
It seems like the Turpentine extensions' EsiController->getBlock() method is not returning a proper response to varnish or may be these ESI blocks are not getting parsed at all. How can I debug further?
The multi-store setup works based on the below changes made to index.php file:
switch($_SERVER['HTTP_HOST']) {
case 'dev.domain.com':
case 'www.dev.domain.com':
$mageRunCode = 'retail_shop_code';
$mageRunType = 'website';
break;
case 'shop.domain.com':
case 'www.shop.domain.com':
$mageRunCode = 'wholesale_shop_code';
$mageRunType = 'website';
break;
}
Mage::run($mageRunCode, $mageRunType);
Just may be above code has something to do with varnish not processing ESI correctly?