Magento升级问题从1.3.0.0升级到1.6.2.0

时间:2012-07-08 17:28:57

标签: magento

我遇到了一个问题,我不知道如何解决它。我是Magento和PHP的新手,所以对错误知之甚少,我通常会谷歌修复它,但似乎找不到任何问题。

我收到以下错误。在升级到1.6.2.0之后,Magento使用了一个名为“modern”的主题,但是当我把它改成我原来的主题时,我得到了错误。我还附加了文件“list_sidebar.phtml”,错误似乎是源于此。

任何帮助将不胜感激。

There has been an error processing your request

Invalid method Mage_Catalog_Block_Product_List::myGetProductCollection(Array
(
    [0] => 18
)
)

Trace:
#0 /home/lailides/devmagento/store/app/design/frontend/default/lailides/template/catalog/product/list_sidebar.phtml(47): Varien_Object->__call('myGetProductCol...', Array)
#1 /home/lailides/devmagento/store/app/design/frontend/default/lailides/template/catalog/product/list_sidebar.phtml(47): Mage_Catalog_Block_Product_List->myGetProductCollection('18')
#2 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(241): include('/home/lailides/...')
#3 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#4 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#6 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#8 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#9 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#10 /home/lailides/devmagento/store/app/design/frontend/default/lailides/template/page/3columns.phtml(46): Mage_Core_Block_Abstract->getChildHtml('left')
#11 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(241): include('/home/lailides/...')
#12 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#13 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#15 /home/lailides/devmagento/store/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#16 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#17 /home/lailides/devmagento/store/app/code/core/Mage/Cms/Helper/Page.php(132): Mage_Core_Controller_Varien_Action->renderLayout()
#18 /home/lailides/devmagento/store/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#19 /home/lailides/devmagento/store/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#20 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Cms_IndexController->indexAction()
#21 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /home/lailides/devmagento/store/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#24 /home/lailides/devmagento/store/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#25 /home/lailides/devmagento/store/index.php(80): Mage::run('', 'store') 

2 个答案:

答案 0 :(得分:0)

可能的情况是,在1.3.0.0安装中,核心被直接修改为包含myGetProductCollection方法,并且在升级过程中被覆盖。

您应该在原始安装和diff之间执行Magento 1.3.0.0。这应该告诉你你的核心如何偏离标准的Magento安装。

一旦确定了这些缺失的方法,就应该使用rewrites来实现它们,这样下次升级时就不会发生这种情况。

答案 1 :(得分:0)

正如丹尼尔所说,如果你覆盖了核心文件,必须对核心文件进行一些直接的自定义。

如果你没有直接替换核心文件并且你正在升级到不同的位置然后检查app \ code \ local或app \ code \ community可能有自定义模块覆盖类Mage_Catalog_Block_Product_List并具有自定义功能,那么你可以只是移动该模块,它可能会再次开始工作。

祝你好运!