Skip to content

Instantly share code, notes, and snippets.

@celmaun
Created August 21, 2011 21:59
Show Gist options
  • Save celmaun/1161232 to your computer and use it in GitHub Desktop.
Save celmaun/1161232 to your computer and use it in GitHub Desktop.
Quick bug fix for Magento Issue #24837 (http://www.magentocommerce.com/bug-tracking/issue/?issue=10453)
<?php
// Quick bug fix for Issue #24837 (http://www.magentocommerce.com/bug-tracking/issue/?issue=10453)
$rootBlock = Mage::app()->getLayout()->getBlock('root');
if ( false !== $rootBlock ) {
foreach ( Mage::getModel('page/config')->getPageLayouts() as $pageLayout ) {
if ( $pageLayout->getTemplate() === $rootBlock->getTemplate() ) {
$rootBlock->setLayoutCode( $pageLayout->getCode() );
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment