magento管理部分中的致命错误添加类别 [英] fatal error in magento admin part add category
问题描述
我在Magento管理员部分遇到一个错误,当我尝试创建类别时,它显示了以下致命错误:
I am facing one error in Magento Admin part, When I try to create a category it shows following fatal Error :
致命错误:在第331行的C:\ wamp \ www \ magento \ lib \ Varien \ Data \ Tree \ Dbp.php中的非对象上调用成员函数getId()
Fatal error: Call to a member function getId() on a non-object in C:\wamp\www\magento\lib\Varien\Data\Tree\Dbp.php on line 331
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');
那么有人可以帮助我吗?如何解决这个问题?谁能给我建议解决方案?
So can anyone help me? how to fix this issues? can anyone suggest me the solution?
推荐答案
运行此SQL查询,它应该立即将其清除:)
Run this SQL query and it should clean it right up :)
插入catalog_category_entity
(entity_id
,entity_type_id
,attribute_set_id
,parent_id
,created_at
,updated_at
,path
,POSITION
,level
,children_count
)值(1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00: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));
插入catalog_category_entity_int
(value_id
,entity_type_id
,attribute_id
,store_id
,entity_id
,value
)值(1,3,32,0,2,1),(2,3, 32,1,2,1);
插入catalog_category_entity_varchar
(value_id
,entity_type_id
,attribute_id
,store_id
,entity_id
,value
)值(1,3,31,0,1,``根目录''),(2 ,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),( 5,3,33,0,2,'默认类别');
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 00: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,'Root Catalog'),(2,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),(5,3,33,0,2,'default-category');
这篇关于magento管理部分中的致命错误添加类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!