【问题标题】:Magento 1.4 url rewrites in multi store environmentMagento 1.4 url​​ 在多商店环境中重写
【发布时间】:2012-11-27 22:58:00
【问题描述】:

长话短说 - 我正在尝试恢复我的 ver1.4 商店(多商店),但首先要恢复到测试环境。 (生产有一个网站在工作,我不想完全失去它。)

在我的测试环境中,当我尝试重新索引目录 URL 重写时,我继续收到以下错误消息:

    An error occurred while saving the URL rewrite.

在此之前,我已经清空了数据库中的 core_url_rewrites 表,清除了 var/cache、var/locks 和 var/session 文件夹,并清除了我的浏览器缓存。

我已经反复这样做了,看看我是否能弄清楚发生了什么。我曾读到,当产品位于多个根类别中时,多商店设置中的 url 重写经常会出现问题。我有很多这样的东西,所以我浏览了我的 cata.logs 和产品,并将每个产品限制为一个根类别(商店/域)。

我的配置设置如下:

System -> Configuration -> Web
  URL Options
Add Store Code to Urls  No [GLOBAL] 
Redirect to Base URL if requested URL doesn't match it  No [GLOBAL] 
  Search Engines Optimization
Use Web Server Rewrites  Yes [STORE VIEW] (all store views set to use Website)

System -> Configuration -> Catalog
  Frontend
Use Flat Catalog Category No [GLOBAL]   
Use Flat Catalog Product No [GLOBAL]    
Allow Dynamic Media URLs in Products and Categories  Yes [STORE VIEW]
  Search Engine Optimizations
Autogenerated Site Map  Enable [STORE VIEW] 
Popular Search Terms Enable [STORE VIEW]    
Product URL Suffix .html [STORE VIEW]   
Category URL Suffix .html [STORE VIEW]  
Use Categories Path for Product URLs Yes [STORE VIEW]   
Create Permanent Redirect for old URLs if Url key changed yes [STORE VIEW]  
Page Title Separator - [STORE VIEW] 
Use Canonical Link Meta Tag For Categories No [STORE VIEW]  
Use Canonical Link Meta Tag For Products No [STORE VIEW]

我确认我的每个目录中都有正确的 .htaccess 文件(根目录和每个带有符号链接的文件夹,表示各种商店/域。)我还仔细检查了我的 index.php 文件。

每次我运行重新索引时,它都会多索引一个项目。我有超过 2500 件物品,所以我倾向于不想通过它 2500 次。我觉得我一定错过了什么,但我不知道是什么。

当我添加新产品时,它通常会给我一条错误消息,指出它失败了,因为它无法创建 url 重写,但添加了该项目。然后下次我重新索引时,新项目会为所有四个商店建立索引。

这似乎不是我以前的设置的问题,所以它可能只是我的测试环境设置的愚蠢方式。

如果有人对我如何识别和/或解决问题有任何想法,我将不胜感激!

干杯! 一分钱

【问题讨论】:

    标签: php .htaccess magento magento-1.4


    【解决方案1】:

    需要有关错误消息的更多信息。查看 var/log 文件夹或 var/report 文件夹以获取有关确切错误的更多信息,并希望那里有一些可以阐明的信息。可能是由于多种原因,所以需要详细的信息。

    【讨论】:

    • 2012-11-27T21:37:25+00:00 ERR (3): Warning: filemtime() [ ]: stat failed for /home/../skin/frontend/base/default /home/../app/code/core/Mage/Core/Helper/Data.php 中的 /js/glider.js 位于第 631 行 2012-11-27T21:37:25+00:00 ERR (3):警告:filemtime()[]:/home/.../skin/frontend/base/default/js/slider.js在/home/../app/code/core/Mage/Core/Helper/Data中的stat失败.php 在线 631 2012-11-27T21:37:25+00:00 ERR (3): 警告: filemtime() []: stat failed for /home/../skin/frontend/base/default/js/ /home/../app/code/core/Mage/Core/Helper/Data.php 中的 productInfo.js 在第 631 行
    • 代码 sn-p 如下:$shouldMerge = $mustMerge || !$targetFile; if (!$shouldMerge) { if (!file_exists($targetFile)) { $shouldMerge = true; } 其他 { $targetMtime = filemtime($targetFile); foreach ($srcFiles as $file) { (line 631) if (filemtime($file) > $targetMtime) { $shouldMerge = true;休息;
    猜你喜欢
    • 1970-01-01
    • 2016-06-01
    • 2016-03-26
    • 2011-06-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多