cancel
Showing results for 
Search instead for 
Did you mean: 

BUG - after SUPEE-8788 i can't remove Samples row of downloadable products

BUG - after SUPEE-8788 i can't remove Samples row of downloadable products

Hello, i'm using magento 1.9.2.4 patched with SUPEE-8788.

Everything seems to be ok a part an issue, ...i'm not able anymore to remove rows in samples

of downloadable products.

I mean when i click the "X" to remove the row of samples, like you can see in the image, nothing happen and i'm not able to save the productCattura11_.png

I saw the same problem happens also in a fresh clean copy of magento 1.9.3.1

Does anyone know why this happens?...can you help me?

Thank you very much

3 REPLIES 3

Re: BUG - after SUPEE-8788 i can't remove Samples row of downloadable products

If it happens in clean Magento 1.9.3.1, then it's not due to SUPEE-8788.

 

Can you open developer's console in web browser, and then click on X (remove). Let me know what happens, what message you see there, also what message you see when you're trying to save product?

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

Re: BUG - after SUPEE-8788 i can't remove Samples row of downloadable products

Hello Sinisa, thank thank you for your reply.

Yes is a bug and i found the problem.

By using inspector analizer in Firefox i found the problem.

By clicking the "X" in samples i got this error Cattura1.PNG

Then by going in "Debugger" i saw the error where the error is generated

Cattura2.PNG

The remove function try to search a div with class "flex" that doesn't exist anymore.

So i went in this folder app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable and i solved the problem by opening the file samples.phtml and i replaced 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();
         }
     },

 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();
         }
     },

like i found in file links.phtml

Also works by commented the code

element.down('div.flex').remove();



Re: BUG - after SUPEE-8788 i can't remove Samples row of downloadable products

It's great to hear that it's finally working for you. I couldn't reproduce such case on my local, it may be something specific to your case.

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue