Magento表确实存在错误

时间:2016-01-19 09:05:56

标签: database magento

我是magento框架中的初学者。我正在开发自定义扩展,它在管理端的自定义菜单中显示产品网格。

一切都正常工作,我突然发现跟随错误,表示catalog_product_entity_dropdown不存在。

  • 我不知道为什么使用这个表。请解释一下。

  • 是默认的magento表吗?

  • 我如何知道错误来自哪个文件?

    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'offer.catalog_product_entity_dropdown' doesn't exist, query was: SELECT `attr_table`.* FROM `catalog_product_entity_varchar` AS `attr_table`
    INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' WHERE (attr_table.entity_id = '1') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_product_entity_decimal` AS `attr_table`
    INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' WHERE (attr_table.entity_id = '1') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_product_entity_int` AS `attr_table`
    INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' WHERE (attr_table.entity_id = '1') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_product_entity_text` AS `attr_table`
    INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' WHERE (attr_table.entity_id = '1') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_product_entity_datetime` AS `attr_table`
    INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' WHERE (attr_table.entity_id = '1') AND (attr_table.store_id IN (0, 1)) UNION ALL SELECT `attr_table`.* FROM `catalog_product_entity_dropdown` AS `attr_table`
    INNER JOIN `eav_entity_attribute` AS `set_table` ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' WHERE (attr_table.entity_id = '1') AND (attr_table.store_id IN (0, 1)) ORDER BY `store_id` ASC
    

1 个答案:

答案 0 :(得分:0)

'catalog_product_entity_dropdown'不是默认的magento表。 因此,您需要检查是否在某个自定义模块中使用此表。

如果是,那么您需要在core_resource表中检查该模块的条目。 如果找到,则可以从表中删除此条目(如果catalog_product_entity_dropdown是唯一与此模块相关的表)或者在core_resource表中降级模块的版本,并删除与该模块相关的所有表的引用。

然后清除magento缓存并重新加载页面。

现在将创建表格。