解决Magneto url rewrite 索引非常慢并且一直停留在Processing状态
Magento 有的版本在刷新index的时候有时候有bug,特别对于URL Rewrite 这条容易出错,或者一直停留在processing状态无法重新建立索引可以用这种方法解决:
1.打开这个文件:
app/code/core/Mage/Catalog/Model/Url.php 2.在807行找到以下内容:
if ($product->getUrlKey() == '' && !empty($requestPath) && strpos($existingRequestPath, $requestPath) === 0 )
3.替换为:
if (!empty($requestPath) && strpos($existingRequestPath, $requestPath) === 0 ) 4. 进入你的Mysql数据库清空这个表 core_url_rewrite 最后重新建立索引即可。
1、登录phpmyadmin(或其他数据库管理工具)
2,打开Magento数据库,找到“core_url_rewrite” 这个表,清空这个表,或者执行以下sql命令
sql: TRUNCATE core_url_rewrite
3、重建网站索引:打开->system->Index Management 选择所有Index,并重建索引数据Reindex Data
近期评论