0

1.7にアップグレードした後(ありがたいことにすべて開発サーバー上にあります!)、クライアントのカスタムテーマについて次のエラーログが表示されます。

a:5:{i:0;s:93:"Invalid method Mage_Catalog_Block_Navigation::renderCategoriesAndChildrenMenuHtml(Array
(
)
)";i:1;s:3806:"#0 /var/www/vhosts/mydomain.co.uk/httpdocs/app/design/frontend/p365_mydomain/default/template/catalog/navigation/left.phtml(17): Varien_Object->__call('renderCategorie...', Array)
#1 /var/www/vhosts/mydomain.co.uk/httpdocs/app/design/frontend/p365_mydomain/default/template/catalog/navigation/left.phtml(17): Mage_Catalog_Block_Navigation->renderCategoriesAndChildrenMenuHtml()
#2 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#3 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/p365_s...')
#4 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#6 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#8 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#9 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#10 /var/www/vhosts/mydomain.co.uk/httpdocs/app/design/frontend/p365_mydomain/default/template/page/2columns-left.phtml(34): Mage_Core_Block_Abstract->getChildHtml('left')
#11 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#12 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/p365_s...')
#13 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#15 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#16 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#17 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#18 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#19 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#20 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Cms_IndexController->indexAction()
#21 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /var/www/vhosts/mydomain.co.uk/httpdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#24 /var/www/vhosts/mydomain.co.uk/httpdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#25 /var/www/vhosts/mydomain.co.uk/httpdocs/index.php(87): Mage::run('', 'store')
#26 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:22:"mydomain_store_view";}

テーマは1.5のインストールで正常に機能していますが、テーマは他の誰かによって作成されたため(古いバージョンをインストールしたため、コアコードなどをいじくり回していないかどうかはわかりません)

グーグルは「無効なメソッドMage_Catalog_Block_Navigation::renderCategoriesMenuHtml」の結果を検出しましたが、「renderCategoriesAndChildrenMenuHtml」の結果は検出しませんでした。カスタム関数かもしれないと思いましたが、コアコードで見つけました。これに完全に困惑しました!

4

1 に答える 1

2

Magento 1.5.0.0のデフォルトのテーマはandを呼び出し、renderCategoriesMenuHtmlブロックには関数のみが含まれますrenderCategoriesMenuHtml。あなたの場合、または誰かがコアファイル、またはを書き換えるモジュールを修正しましたMage_Catalog_Block_Navigation

考えられる解決策の1つは、関数renderCategoriesAndChildrenMenuHtmlrenderCategoriesMenuHtmlファイル内に置き換えるapp/design/frontend/p365_mydomain/default/template/catalog/navigation/left.phtmlか、ナビゲーション/左のデフォルトテンプレートをコードで使用することです。

<?php if (!Mage::registry('current_category')) return ?>
<?php $_categories = $this->getCurrentChildCategories() ?>
<?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
<?php if($_count): ?>
<div class="block block-layered-nav">
    <div class="block-title">
        <strong><span><?php echo $this->__('Browse By') ?></span></strong>
    </div>
    <div class="block-content">
        <dl id="narrow-by-list2">
            <dt><?php echo $this->__('Category') ?></dt>
            <dd>
                <ol>
                <?php foreach ($_categories as $_category): ?>
                    <?php if($_category->getIsActive()): ?>
                    <li>
                        <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
                    </li>
                    <?php endif; ?>
                <?php endforeach ?>
                </ol>
            </dd>
        </dl>
        <script type="text/javascript">decorateDataList('narrow-by-list2')</script>
    </div>
</div>
<?php endif; ?>
于 2012-10-25T12:48:16.620 に答える