为什么magento会在core_url_重写表中生成重复重写?
我可以举一个非常具体的例子。编制索引前:为什么magento会在core_url_重写表中生成重复重写?,magento,magento-1.4,Magento,Magento 1.4,我可以举一个非常具体的例子。编制索引前: mysql> SELECT * FROM core_url_rewrite WHERE target_path = 'catalog/category/view/id/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)
编制索引后:
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会创建一个重复的重写?这是虫子吗
如有任何见解,将不胜感激。谢谢
Aaron我想这是Magento 1.4中的一个bug。升级到1.6解决了这个问题。只是开玩笑而已。这又发生了。