为什么magento会在core_url_rewrite表中生成重复的重写?

时间:2012-03-07 14:40:10

标签: magento magento-1.4

我可以给出一个非常具体的例子。在指数之前:

mysql> SELECT * FROM core_url_rewrite WHERE target_path = 'catalog/category/view/id/4';
+----------------+----------+-------------+------------+--------------+--------------+----------------------------+-----------+---------+-------------+
| url_rewrite_id | store_id | category_id | product_id | id_path      | request_path | target_path                | is_system | options | description |
+----------------+----------+-------------+------------+--------------+--------------+----------------------------+-----------+---------+-------------+
|           1508 |        1 |           4 |       NULL | category/4_1 | food.html    | catalog/category/view/id/4 |         1 |         |             |
+----------------+----------+-------------+------------+--------------+--------------+----------------------------+-----------+---------+-------------+
1 row in set (0.00 sec)

索引后:

mysql> SELECT * FROM core_url_rewrite WHERE target_path = 'catalog/category/view/id/4';
+----------------+----------+-------------+------------+--------------+--------------+----------------------------+-----------+---------+-------------+
| url_rewrite_id | store_id | category_id | product_id | id_path      | request_path | target_path                | is_system | options | description |
+----------------+----------+-------------+------------+--------------+--------------+----------------------------+-----------+---------+-------------+
|           1508 |        1 |           4 |       NULL | category/4_1 | food.html    | catalog/category/view/id/4 |         1 |         |             |
|           8512 |        1 |           4 |       NULL | category/4   | food-1.html  | catalog/category/view/id/4 |         1 |         | NULL        |
+----------------+----------+-------------+------------+--------------+--------------+----------------------------+-----------+---------+-------------+
2 rows in set (0.01 sec)

所以我的问题是,为什么Magento会创建一个重复的重写?这是一个错误吗?

任何见解都将非常感激。谢谢!

亚伦

1 个答案:

答案 0 :(得分:0)

嗯,我想这是Magento 1.4中的一个错误。升级到1.6解决了这个问题。