Magento 1.9.3.6 to 1.9.3.7 升級教學

You are here:
< All Topics

前言

Magento 推出了 1.9.3.7,除了整合了安全性補丁之外

對我們最大的差異是修正了登入管理頁面會跳出”Invalid Secret Key. Please refresh the page.”的 Bug

省去一些麻煩!

 

這次 Magento 升級可以透過四種方式

1. Magento Connect(比較容易有問題,難度較高)

2. Command Line(成功率高,缺點是速度不快)

3. 直接覆蓋新版檔案(只能做小版本升級,優點是速度快,網站停機時間短)

4. 透過 diff 檔升級(這次 Magento 有放出 diff 檔,更新很簡單,此次改用此方式)

因為使用 diff 檔升級的後續工作少很多,所以這次改用此方式進行升級

升級前須知

我們目前僅修改了

1. Magento API Integration Calling Parameter Do Not Match Signature

2. 移除購物車中的『預估運費及稅金』

3. 使用 Magento Connect 更新時出現錯誤訊息:Unknown cipher in list: TLSv1(已永久性修正)

4. 隱藏 Bundle Products(產品組合)主產品下方的數量框

5. 修改地址排列格式:

修改地址排列格式(Address Layout) – 上

修改地址排列格式(Address Layout) – 下

6. 修改評論 Rating Star 的顏色

7. 移除『購物車』中的 Coupon 圖示

測試後,都沒有動到這些檔案,因此可以直接套用升級

升級 Magento

備份現有檔案

參照 Magento 備份、複製到測試環境的流程

su
tar zcf magento_$(date +%Y-%m-%d).tar.gz html --exclude html/var/cache --exclude html/var/session --exclude html/var/log
傳 diff 檔至伺服器,並放置到 Magento 根目錄下
gcloud compute scp CE-1.9.3.6-1.9.3.7-2017-11-27-05-35-33.diff cewolf@magento:~
gcloud compute ssh magento
su
mv CE-1.9.3.6-1.9.3.7-2017-11-27-05-35-33.diff /usr/share/nginx/html
安裝 Patch 程式、開始升級
yum -y install patch
patch -p1 -f < CE-1.9.3.6-1.9.3.7-2017-11-27-05-35-33.diff

刷新『OPCache』與『快取』就升級至 1.9.3.7 了

https://www.gapl.com.tw/resetopc.php

https://www.gapl.com.tw/nocache.php

升級過程對整個網站影響時間應該不到一分鐘喔!

更新檔案清單


The next patch would delete the file .githookignore,
which does not exist!  Applying it anyway.
patching file .githookignore
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file .githookignore.rej
The next patch would delete the file .gitignore,
which does not exist!  Applying it anyway.
patching file .gitignore
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file .gitignore.rej
patching file RELEASE_NOTES.txt
patching file app/Mage.php
patching file app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php
patching file app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php
patching file app/code/core/Mage/Adminhtml/Block/Review/Add.php
patching file app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php
patching file app/code/core/Mage/Adminhtml/Controller/Action.php
patching file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php
patching file app/code/core/Mage/Api/Helper/Data.php
patching file app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
patching file app/code/core/Mage/Api/Model/Wsdl/Config.php
patching file app/code/core/Mage/Api/Model/Wsdl/Config/Base.php
patching file app/code/core/Mage/Core/Helper/String.php
patching file app/code/core/Mage/Core/Model/File/Validator/Image.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/Model/Customer.php
patching file app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Serialized.php
patching file app/code/core/Mage/Log/Helper/Data.php
patching file app/code/core/Mage/Rule/Model/Abstract.php
patching file app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/Grid.php
patching file app/code/core/Zend/Form/Decorator/Form.php
patching file app/design/adminhtml/default/default/template/backup/dialogs.phtml
patching file app/design/adminhtml/default/default/template/sales/billing/agreement/view/tab/info.phtml
patching file app/design/adminhtml/default/default/template/xmlconnect/edit/tab/content.phtml
patching file app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/image_edit.phtml
patching file app/locale/en_US/Mage_Adminhtml.csv
patching file app/locale/en_US/Mage_Core.csv
patching file app/locale/en_US/Mage_Customer.csv
patching file downloader/Maged/Controller.php
patching file js/mage/adminhtml/backup.js
patching file lib/Varien/Filter/FormElementName.php
patching file var/package/Cm_RedisSession-1.9.3.6.xml
patching file var/package/Cm_RedisSession-1.9.3.7.xml
patching file var/package/Interface_Adminhtml_Default-1.9.3.6.xml
patching file var/package/Interface_Adminhtml_Default-1.9.3.7.xml
patching file var/package/Interface_Frontend_Base_Default-1.9.3.6.xml
patching file var/package/Interface_Frontend_Base_Default-1.9.3.7.xml
patching file var/package/Interface_Frontend_Default-1.9.3.6.xml
patching file var/package/Interface_Frontend_Default-1.9.3.7.xml
patching file var/package/Interface_Frontend_Rwd_Default-1.9.3.6.xml
patching file var/package/Interface_Frontend_Rwd_Default-1.9.3.7.xml
patching file var/package/Interface_Install_Default-1.9.3.6.xml
patching file var/package/Interface_Install_Default-1.9.3.7.xml
patching file var/package/Lib_Cm-1.9.3.6.xml
patching file var/package/Lib_Cm-1.9.3.7.xml
patching file var/package/Lib_Credis-1.9.3.6.xml
patching file var/package/Lib_Credis-1.9.3.7.xml
patching file var/package/Lib_Google_Checkout-1.9.3.6.xml
patching file var/package/Lib_Google_Checkout-1.9.3.7.xml
patching file var/package/Lib_IDNA2-1.9.3.6.xml
patching file var/package/Lib_IDNA2-1.9.3.7.xml
patching file var/package/Lib_Js_Calendar-1.51.1.12.xml
patching file var/package/Lib_Js_Calendar-1.51.1.13.xml
patching file var/package/Lib_Js_Ext-1.9.3.6.xml
patching file var/package/Lib_Js_Ext-1.9.3.7.xml
patching file var/package/Lib_Js_Mage-1.9.3.6.xml
patching file var/package/Lib_Js_Mage-1.9.3.7.xml
patching file var/package/Lib_Js_Prototype-1.9.3.6.xml
patching file var/package/Lib_Js_Prototype-1.9.3.7.xml
patching file var/package/Lib_Js_TinyMCE-3.5.11.11.xml
patching file var/package/Lib_Js_TinyMCE-3.5.11.12.xml
patching file var/package/Lib_LinLibertineFont-2.8.14.12.xml
patching file var/package/Lib_LinLibertineFont-2.8.14.13.xml
patching file var/package/Lib_Mage-1.9.3.6.xml
patching file var/package/Lib_Mage-1.9.3.7.xml
patching file var/package/Lib_Magento-1.9.3.6.xml
patching file var/package/Lib_Magento-1.9.3.7.xml
patching file var/package/Lib_Pelago-1.9.3.6.xml
patching file var/package/Lib_Pelago-1.9.3.7.xml
patching file var/package/Lib_Phpseclib-1.9.3.6.xml
patching file var/package/Lib_Phpseclib-1.9.3.7.xml
patching file var/package/Lib_Unserialize-1.9.3.6.xml
patching file var/package/Lib_Unserialize-1.9.3.7.xml
patching file var/package/Lib_Varien-1.9.3.6.xml
patching file var/package/Lib_Varien-1.9.3.7.xml
patching file var/package/Lib_ZF-1.12.10.11.xml
patching file var/package/Lib_ZF-1.12.10.12.xml
patching file var/package/Lib_ZF_Locale-1.12.10.11.xml
patching file var/package/Lib_ZF_Locale-1.12.10.12.xml
patching file var/package/Mage_All_Latest-1.9.3.6.xml
patching file var/package/Mage_All_Latest-1.9.3.7.xml
patching file var/package/Mage_Centinel-1.9.3.6.xml
patching file var/package/Mage_Centinel-1.9.3.7.xml
patching file var/package/Mage_Compiler-1.9.3.6.xml
patching file var/package/Mage_Compiler-1.9.3.7.xml
patching file var/package/Mage_Core_Adminhtml-1.9.3.6.xml
patching file var/package/Mage_Core_Adminhtml-1.9.3.7.xml
patching file var/package/Mage_Core_Modules-1.9.3.6.xml
patching file var/package/Mage_Core_Modules-1.9.3.7.xml
patching file var/package/Mage_Downloader-1.9.3.6.xml
patching file var/package/Mage_Downloader-1.9.3.7.xml
patching file var/package/Mage_Locale_en_US-1.9.3.6.xml
patching file var/package/Mage_Locale_en_US-1.9.3.7.xml
patching file var/package/Magento_Mobile-1.9.3.6.xml
patching file var/package/Magento_Mobile-1.9.3.7.xml
patching file var/package/Phoenix_Moneybookers-1.9.3.6.xml
patching file var/package/Phoenix_Moneybookers-1.9.3.7.xml

額外注意事項

var/package/ 裡面有很多檔案,可以找時間來刪除乾淨

升級完後發現這兩個檔案如果加入 Formkey Validation 後會無法 redirect 至玉山信用卡刷卡頁面

app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml

app/design/frontend/base/default/template/checkout/onepage/shipping.phtml

目前只能先移除  <?php echo $this->getBlockHtml(‘formkey’) ?>

Previous Magento 1.9.3.4 to 1.9.3.6 升級教學
Next Magento 1.9.3.7 to 1.9.3.8 升級教學
Table of Contents