0

I have just patched my Magento 1.9.2.4 with SUPEE-8788. Everything seems to be ok a part an issue in removing samples of downloadable products. I mean when i click the "X" to remove the samples nothing happens enter image description here

If i check with firebug included in firefox i see an error: "Uncaught TypeError: Cannot read property 'remove' of undefined at Object.remove ((index):2113) at HTMLButtonElement. (prototype.js:391) at HTMLButtonElement.responder (prototype.js:5598)"

Can anyone know why this happens?

1

I found the solution, this is a bug in SUPEE-8788

Open samples.phtml inside app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable

Find the function

remove : function(event){
    var element = $(Event.findElement(event, 'tr'));
    alertAlreadyDisplayed = false;
    if(element){
        element.down('input[type="hidden"].__delete__').value = '1';
        element.down('div.flex').remove();
        element.addClassName('no-display');
        element.addClassName('ignore-validate');
        element.hide();
    }
},

and replace it with

remove : function(event){
    var element = $(Event.findElement(event, 'tr'));
    alertAlreadyDisplayed = false;
    if(element){
        element.down('input[type="hidden"].__delete__').value = '1';
        Element.select(element, 'div.flex').each(function(elm){
            elm.remove();
        });
        element.addClassName('no-display');
        element.addClassName('ignore-validate');
        element.hide();
    }
},

This will solve the BUG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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