Skip to content

Commit

Permalink
fix layout fixup for messages block with layout cache enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aheadley committed Jan 15, 2013
1 parent b4ba606 commit 3731c3f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,15 @@ protected function _handleDirectCall( $methodCalled ) {
$this->_directCall = $methodCalled;
if( $this->_fixMessages() ) {
$layout = $this->getLayout();
$layout->getUpdate()->load( 'default' );
$layoutUpdate = $layout->getUpdate()->load( 'default' );
if( Mage::app()->useCache( 'layout' ) ) {
// this is skipped in the layout update load() if the "layout"
// cache is enabled, which seems to cause the esi layout stuff
// to not load, so we manually do it here
foreach( $layoutUpdate->getHandles() as $handle ) {
$layoutUpdate->merge( $handle );
}
}
$layout->generateXml();
$layoutShim = Mage::getSingleton( 'turpentine/shim_mage_core_layout' );
foreach( $layout->getNode()->xpath(
Expand Down

0 comments on commit 3731c3f

Please sign in to comment.