Magento 1.8-高级搜索不起作用 [英] Magento 1.8 - Advanced Search doesn't work
问题描述
我在magento的最新版本中发现了一个奇怪的错误:高级搜索"工具无法正常工作.
I have found a strange bug in the latest release of magento: Advanced Search tool doesn't work properly.
我做了什么:
- 安装magento的新副本
- 在管理页面上添加了一个名为测试1"的产品
- 全部重新编制索引
- 清除了所有缓存
- 在前端页面上:
- 打开高级搜索页面
- 在目录中搜索您之前添加的测试1"产品
- 没有结果
- Install a fresh copy of magento
- Added a product called Test 1 by the administration page
- Reindex all
- Cleared all caches
- At the frontend page:
- Open the Advanced Search Page
- Search the "Test 1" product that you have added before in the catalog
- No result
我没有使用产品的名称"作为搜索属性的结果.
I have no result using as search attribute the "Name" of the product.
似乎其他用户有相同的问题: Magento高级搜索没有返回结果
Seems that another user has the same issue: Magento advanced search returns no results
如果在数据库中看到实体表,则可以看到带有产品名称的属性"71".属性71是名称" Magento属性.
If you see the entity table in the database, you can see the attribute "71" with the name of the product. Attribute 71 is the "Name" Magento Attribute.
目录产品Varchar属性后端表
如果我尝试在app/code/core/Mage/CatalogSearch/Model/Advanced.php中读取Magento代码并对其进行调试,则可以看到以下命令:
If I try to read the Magento code at app/code/core/Mage/CatalogSearch/Model/Advanced.php and debug it, I can see this command:
$this->getProductCollection()->addFieldsToFilter($allConditions); array(1) { ["catalog_product_entity_varchar"] => array(1) { [71] => array(1) { ["like"] => string(9) "%Test 1%" } } }
但是Magento没有显示任何结果.
but Magento doesn't show me any result.
如果我尝试使用SKU字段执行搜索过程,则magen会退回产品!
array(1) { ["catalog_product_entity"] => array(1) { ["sku"] => array(1) { ["like"] => string(6) "%test%" } } }
是Magento错误吗?
Is a Magento Bug?
更新:如果我将默认类别添加到产品类别列表中,似乎可以正常工作. Magento的行为正常吗?
Update: If I add the default category to the list of the product categories, seems that it works. Is a normal Magento behaviour?
谢谢
推荐答案
由于高级搜索查询的完成方式,这可能是mysql 5.6中的错误.该错误报告中有一个解决方法.
This is probably a bug in mysql 5.6 due to how the advanced search query is done. There is a work around in this bug report.
http://bugs.mysql.com/bug.php?id=70608
这篇关于Magento 1.8-高级搜索不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!