【问题标题】:Magento 1.9.2.1 SUPEE-6788 patch - Hunk fail on .htaccessMagento 1.9.2.1 SUPEE-6788 补丁 - Hunk 在 .htaccess 上失败
【发布时间】:2015-10-28 11:28:40
【问题描述】:

我刚刚将 suree 6788 补丁应用到我们的 magento 1.9.2.1 安装中,但是在执行时

sh PATCH_SUPEE-6788_CE_1.9.2.1_v1-2015-10-26-11-38-41.sh

我得到以下信息:-

 15-10-26-11-38-41.sh
    Checking if patch can be applied/reverted successfully...
    ERROR: Patch can't be applied/reverted successfully.

    patching file .htaccess
    Hunk #1 FAILED at 207.
    1 out of 1 hunk FAILED -- saving rejects to file .htaccess.rej
    patching file .htaccess.sample
    patching file app/code/core/Mage/Admin/Model/Block.php
    patching file app/code/core/Mage/Admin/Model/Resource/Block.php
    patching file app/code/core/Mage/Admin/Model/Resource/Block/Collection.php
    patching file app/code/core/Mage/Admin/Model/Resource/Variable.php
    patching file app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php
    patching file app/code/core/Mage/Admin/Model/Variable.php
    patching file app/code/core/Mage/Admin/etc/config.xml
    patching file app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php
    patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php
    patching file app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php
    patching file app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php
    patching file app/code/core/Mage/Adminhtml/etc/adminhtml.xml
    patching file app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php
    patching file app/code/core/Mage/Core/Controller/Front/Action.php
    patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
    patching file app/code/core/Mage/Core/Helper/UnserializeArray.php
    patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
    patching file app/code/core/Mage/Core/Model/Resource/Setup.php
    patching file app/code/core/Mage/Core/etc/config.xml
    patching file app/code/core/Mage/Core/etc/system.xml
    patching file app/code/core/Mage/Customer/Block/Account/Changeforgotten.php
    patching file app/code/core/Mage/Customer/Block/Account/Resetpassword.php
    patching file app/code/core/Mage/Customer/controllers/AccountController.php
    patching file app/code/core/Mage/Downloadable/Model/Product/Type.php
    patching file app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php
    patching file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
    patching file app/code/core/Mage/Sales/controllers/DownloadController.php
    patching file app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php
    patching file app/design/adminhtml/default/default/layout/admin.xml
    patching file app/design/frontend/base/default/layout/customer.xml
    patching file app/design/frontend/base/default/template/customer/form/register.phtml
    patching file app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml
    patching file app/design/frontend/base/default/template/persistent/customer/form/register.phtml
    patching file app/design/frontend/default/iphone/layout/customer.xml
    patching file app/design/frontend/default/modern/layout/customer.xml
    patching file app/design/frontend/rwd/default/layout/customer.xml
    patching file app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml
    patching file app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml
    patching file cron.php
    The next patch would delete the file dev/tests/functional/.htaccess,
    which does not exist!  Assume -R? [n]
    Apply anyway? [n]
    Skipping patch.
    1 out of 1 hunk ignored
    patching file errors/processor.php
    patching file lib/Unserialize/Parser.php
    patching file lib/Unserialize/Reader/Arr.php
    patching file lib/Unserialize/Reader/ArrKey.php
    patching file lib/Unserialize/Reader/ArrValue.php
    patching file lib/Unserialize/Reader/Bool.php
    patching file lib/Unserialize/Reader/Dbl.php
    patching file lib/Unserialize/Reader/Int.php
    patching file lib/Unserialize/Reader/Str.php
    patching file lib/Varien/Data/Collection/Db.php
    patching file lib/Zend/Xml/Security.php

我认为补丁没有正确应用?

【问题讨论】:

  • 是的,它不适用
  • 任何想法为什么它不会?
  • 您需要使用基础安装中的 .htaccess 文件,可能是您编辑了这些文件
  • 啊,是的,从来没想过,我有一个需要编辑的 htaccess 运行的多站点。谢谢!

标签: magento patch


【解决方案1】:

这是因为编辑了 .htaccess 文件。

1) 备份您的 .htaccess 文件

2) 用 .htaccess.sample 中的数据替换您的 .htaccess 文件(如果没有,请从您的库存 Magento 安装中下载 .htaccess.sample 文件)

3) 应用补丁

4) 将您的备份复制到 .htaccess 中

5) 添加补丁添加到 htaccess 文件中的 cron.php 行。

【讨论】:

  • 我可以从哪里获得未经编辑的基本 htaccess 文件?因为我没有原版,magento 下载文件现在在 1.9.2.2 上。
  • 如果您没有示例,您将不得不从这里下载它magentocommerce.com/download -> 发布存档。我也得到了同样的错误,只是因为当我粘贴它时,最后有一个额外的换行符。
  • 你好,我已经替换为基础文件了,但是好像还有其他问题,把输出转储到下面
  • 您还有问题吗?我看到它在这里失败了 dev/tests/functional/.htaccess。那条路是什么?还要确保应用了所有以前的补丁:magereport.com/scan
  • 我上传了 dev 文件夹,因为它似乎不在我的服务器上,然后成功应用了补丁。但是我的主页上现在没有产品显示,所以需要在仪表板中找到一个有趣的修复程序,它没有显示 1.9.2.2,我还需要通过连接管理器升级吗?
【解决方案2】:

使用 .htaccess.sample 将不起作用。在库存的 magento 安装中,.htaccess.htaccess.sample 的大小不同。 您将需要为您的版本使用股票 magento .htaccess。上传股票版本后,您可以应用补丁,然后只需将 .htaccess 底部的文件标签添加到您的 .htaccess 版本。

【讨论】:

    【解决方案3】:

    很简单

    第 1 步:备份您的 .htaccess.htaccess.sample

    第 2 步:根据您的 Magento 版本上传原始 .htaccess.htaccess.sample 文件。

    第 3 步:执行补丁

    【讨论】:

      【解决方案4】:

      然后手动将 cron 内容添加到您的 htaccess 并从补丁批处理中删除该内容。

      【讨论】:

        【解决方案5】:

        可能是这个帮助

        尝试删除这个文件夹/lib/Unserialize然后应用。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2016-02-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-02-04
          • 1970-01-01
          相关资源
          最近更新 更多