0

This is what I get if I try to install SUPEE-11155 with

$ ./PATCH_SUPEE-11155_CE_1.9.4.0_v4-2019-08-01-04-08-31.sh`

Output:

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

checking file app/Mage.php
Hunk #1 succeeded at 819 (offset 3 lines).
checking file app/code/core/Mage/Admin/Model/Block.php
checking file app/code/core/Mage/Admin/Model/User.php
checking file app/code/core/Mage/AdminNotification/etc/system.xml
checking file app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php
checking file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
checking file app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php
checking file app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php
checking file app/code/core/Mage/Adminhtml/Block/Template.php
checking file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php
checking file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php
checking file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
checking file app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php
checking file app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
checking file app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php
checking file app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php
checking file app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php
checking file app/code/core/Mage/Adminhtml/controllers/SitemapController.php
checking file app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
checking file app/code/core/Mage/Catalog/Helper/Product.php
checking file app/code/core/Mage/Catalog/controllers/Product/CompareController.php
checking file app/code/core/Mage/Checkout/Model/Session.php
checking file app/code/core/Mage/Checkout/controllers/OnepageController.php
checking file app/code/core/Mage/Cms/Helper/Data.php
checking file app/code/core/Mage/Cms/Model/Wysiwyg/Config.php
checking file app/code/core/Mage/Cms/etc/config.xml
checking file app/code/core/Mage/Compiler/Model/Process.php
checking file app/code/core/Mage/Core/Helper/Abstract.php
checking file app/code/core/Mage/Core/Helper/Data.php
checking file app/code/core/Mage/Core/Model/Design/Package.php
checking file app/code/core/Mage/Core/Model/Email/Template/Filter.php
checking file app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php
checking file app/code/core/Mage/Core/Model/Observer.php
checking file app/code/core/Mage/Core/etc/config.xml
checking file app/code/core/Mage/Core/functions.php
checking file app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
checking file app/code/core/Mage/Downloadable/controllers/DownloadController.php
checking file app/code/core/Mage/SalesRule/Model/Coupon/Massgenerator.php
checking file app/code/core/Mage/SalesRule/Model/Resource/Report/Rule/Createdat.php
checking file app/code/core/Mage/Sendfriend/etc/config.xml
checking file app/code/core/Mage/Sendfriend/etc/system.xml
checking file app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/configurable.phtml
checking file app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml
checking file app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml
checking file app/design/adminhtml/default/default/template/currencysymbol/grid.phtml
checking file app/design/adminhtml/default/default/template/customer/tab/addresses.phtml
checking file app/design/adminhtml/default/default/template/customer/tab/view.phtml
checking file app/design/adminhtml/default/default/template/notification/window.phtml
checking file app/design/adminhtml/default/default/template/sales/order/create/data.phtml
checking file app/design/adminhtml/default/default/template/sales/order/view/info.phtml
checking file app/design/adminhtml/default/default/template/system/currency/rate/matrix.phtml
checking file app/locale/en_US/Mage_Adminhtml.csv
checking file app/locale/en_US/Mage_Core.csv
checking file app/locale/en_US/Mage_Sales.csv
checking file app/locale/en_US/Mage_Sitemap.csv
checking file js/mage/adminhtml/wysiwyg/tiny_mce/setup.js
checking file js/tiny_mce/plugins/media/js/media.js
checking file js/varien/js.js
can't find file to patch at input line 1553
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git lib/phpseclib/PHP/Compat/Function/array_fill.php lib/phpseclib/PHP/Compat/Function/array_fill.php
|index 79b5312aa2d..7eb231a0962 100644
|--- lib/phpseclib/PHP/Compat/Function/array_fill.php
|+++ lib/phpseclib/PHP/Compat/Function/array_fill.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 1570
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git lib/phpseclib/PHP/Compat/Function/bcpowmod.php lib/phpseclib/PHP/Compat/Function/bcpowmod.php
|index 4c162b87ef6..0366fef84d4 100644
|--- lib/phpseclib/PHP/Compat/Function/bcpowmod.php
|+++ lib/phpseclib/PHP/Compat/Function/bcpowmod.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 1587
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git lib/phpseclib/PHP/Compat/Function/str_split.php lib/phpseclib/PHP/Compat/Function/str_split.php
|index 8f5179bc988..607e5ca32c4 100644
|--- lib/phpseclib/PHP/Compat/Function/str_split.php
|+++ lib/phpseclib/PHP/Compat/Function/str_split.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored

I never changed any core files

2 Answers 2

2

For those having issues with js/varien/js.js just remove the diff code from the patch and then download Magento 1.9.4.3 and copy said file back to your install. Or paste this to the end of said file.

/**
 * Create form element. Set parameters into it and send
 *
 * @param url
 * @param parametersArray
 * @param method
 */
Varien.formCreator = Class.create();
Varien.formCreator.prototype = {
    initialize : function(url, parametersArray, method) {
        this.url = url;
        this.parametersArray = JSON.parse(parametersArray);
        this.method = method;
        this.form = '';

        this.createForm();
        this.setFormData();
    },
    createForm : function() {
        this.form = new Element('form', { 'method': this.method, action: this.url });
    },
    setFormData : function () {
        for (var key in this.parametersArray) {
            Element.insert(
                this.form,
                new Element('input', { name: key, value: this.parametersArray[key], type: 'hidden' })
            );
        }
    }
};

function customFormSubmit(url, parametersArray, method) {
    var createdForm = new Varien.formCreator(url, parametersArray, method);
    Element.insert($$('body')[0], createdForm.form);
    createdForm.form.submit();
}

function customFormSubmitToParent(url, parametersArray, method) {
    new Ajax.Request(url, {
        method: method,
        parameters: JSON.parse(parametersArray),
        onSuccess: function (response) {
            var node = document.createElement('div');
            node.innerHTML = response.responseText;
            var responseMessage = node.getElementsByClassName('messages')[0];
            var pageTitle = window.document.body.getElementsByClassName('page-title')[0];
            pageTitle.insertAdjacentHTML('afterend', responseMessage.outerHTML);
            window.opener.focus();
            window.opener.location.href = response.transport.responseURL;
        }
    });
}

The above code will go after

if ((typeof Range != "undefined") && !Range.prototype.createContextualFragment)
{
    Range.prototype.createContextualFragment = function(html)
    {
        var frag = document.createDocumentFragment(),
        div = document.createElement("div");
        frag.appendChild(div);
        div.outerHTML = html;
        return frag;
    };
}
1
  • I solved it by just copying all files from Magento 1.9.4.3 into my project. If you never touched the core files, then it is guaranteed to work this way. But you are right, It would be better if I just add the missing files and then try the patch again, because now I have nearly all magento files in my git and it is unclear what the patch actually changed, since they always change the copyright date and it is getting logged into git.
    – Black
    Nov 7, 2019 at 9:53
1

you can remove some of code from patch file because your magento does not have that files or code.

  • check js/varien/js.js into patch file and add difference code into your magento js/varien/js.js file and remove below code from patch:

    diff --git js/varien/js.js js/varien/js.js
    index cffb916b391..14e4c7fa1c0 100644
     --- js/varien/js.js
     +++ js/varien/js.js
     @@ -707,3 +707,40 @@ if ((typeof Range != "undefined") && 
    !Range.prototype.createContextualFragment)
         return frag;
     };
    }
    
  • check all three files while occurs error:

    • array_fill.php
    • bcpowmod.php
    • str_split.php

remove code from your patch file and add difference code into your magento file directly.

Then run patch again!

5
  • But my magento has the file js/varien/js.js
    – Black
    Oct 25, 2019 at 8:33
  • The file lib/phpseclib/PHP/Compat/Function/array_fill.php is missing though. Indeed the whole folder lib/phpseclib/PHP is missing.
    – Black
    Oct 25, 2019 at 8:43
  • yes i know you can replace code for js.js file and remove other file code Oct 25, 2019 at 8:51
  • that's why i mention to replace code manually and remove code for other files which are not exist! Oct 25, 2019 at 8:53
  • please accept answer if it helps you to resolve your issue. Oct 25, 2019 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.