fidesio / attribute-index-fix
N/A
1.1.0
2017-09-23 11:47 UTC
Requires
- php: ~7.0.0
- lib-libxml: *
- magento/framework: 100.1.*
This package is not auto-updated.
Last update: 2024-09-15 03:34:22 UTC
README
Magento 2 支持为属性自定义源模型,除了将它们索引到 catalog_product_index_eav 表(为分层导航提供数据)之外。
原始问题出现在 \Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav\Source:302,那里确保保存的值存在于 eav_attribute_option 表中。当使用该自定义源模型时,这些值不存在。
第一个/简单的解决方案是注释掉这些行。但这在生产环境中不可行,因此需要一种更持久的解决方案。虽然使用 preference 不是最佳选择,但这将在短期内解决问题。
经过一番研究和许多小时的努力,我发现 @maderlock 有一个好的修复方案:magento/magento2#417 (评论)
以下是运行此程序的步骤
composer require fidesio/attribute-index-fixphp bin/magento module:enable SwiftOtter_AttributeIndexFixphp bin/magento cache:clean