Question

I'm trying to add a block to product pages by way of my theme's local.xml file, only to have turpentine blow up.

Here's the relevant local.xml (which works if I omit the setEsiOptions):

...
<catalog_product_view>
    <reference name="product.info">
        <block type="catalog/product_view" name="wholesale.grid" as="wholesale_grid" template="wholesale/wholesalegrid.phtml">
            <action method="setEsiOptions">
                <params>
                    <access>customer_group</access>
                    <registry_keys>
                        <current_product/>
                    </registry_keys>
                </params>
            </action>
        </block>
    </reference>
</catalog_product_view>
...

When the setEsiOptions action is omitted, the proper content is displayed. When it's included, the following shows up in the error logs:

2015-12-21T21:19:46+00:00 WARN (4): TURPENTINE: No block node found with @name="wholesale.grid"

Here's a link to the line responsible in Turpentine

Was it helpful?

Solution

Looks like I found a bug in Turpentine! Or at least a case that isn't handled correctly.

I was using the System -> Design override for this store view which trickles through to layout.

Turpentine can see the block on the way out and correctly makes the decision to encode the data based on the esiOptions present. When the request comes back to turpentine by way of Ajax or Varnish, it can't find the block by name because it doesn't take System -> Design layout xml overrides into account.

Once I changed the layout defined in System -> Configuration -> Design -> Layout for that store view, the problem was resolved.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top