我在Magento管理部分遇到一个错误,当我尝试创建一个类别时,它显示以下致命错误:
致命错误:在第331行的C:\ wamp\www\magento\lib\Varien\Data\Tree\Dbp.php中的非对象上调用成员函数getId()
public function loadEnsuredNodes($category, $rootNode)
{
$pathIds = $category->getPathIds();
$rootNodeId = $rootNode->getId();
$rootNodePath = $rootNode->getData($this->_pathField);
$select = clone $this->_select;
$select->order($this->_table.'.'.$this->_orderField . ' ASC');
Run Code Online (Sandbox Code Playgroud)
所以有人可以帮助我吗?如何解决这个问题?有谁能建议我的解决方案?
运行此SQL查询,它应该清理它:)
INSERT INTO catalog_category_entity(entity_id,entity_type_id,attribute_set_id,parent_id,created_at,updated_at,path,POSITION,level,children_count)VALUES(1,3,0,0, '0000-00-00 00:00:00', '2009-02-20 0时25分34秒'," 1',1,0,1),(2,3,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2' ,1,1,0); INSERT INTO catalog_category_entity_int(value_id,entity_type_id,attribute_id,store_id,entity_id,value)VALUES(1,3,32,0,2,1),(2,3,32,1,2,1); INSERT INTO catalog_category_entity_varchar(value_id,entity_type_id,attribute_id,store_id,entity_id,value)VALUES(1,3,31,0,1, '根目录'),(2,3,33,0,1, '根目录'),(3,3, 31,0,2,'默认类别'),(4,3,39,0,2,'产品'),(5,3,33,0,2,'默认类别');