dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
49 stars 63 forks source link

Require.js not handling errors when script is blocked or fails to load. #521

Closed vetshopdeveloper closed 6 years ago

vetshopdeveloper commented 6 years ago

Please add the following to your plugin JS code

, function (error) {    
           console.error(error
            return true;
        });

This prevents require.js breaking if script is blocked

simon-letch commented 6 years ago

Hey @vetshopdeveloper,

As far as I know, there's no place we can add that to our extension. It's Magento that needs to catch the module load errors and handle them gracefully.

This Magento pull request appears to implement what you suggest: https://github.com/magento/magento2/pull/13061 but doesn't work.

I'm looking into alternatives now.

simon-letch commented 6 years ago

This pull request appears to fix the root cause of the issue in Magento: https://github.com/magento/magento2/pull/14874

They state it was fixed in 2.2.5, but I only see the changes in 2.2.6+

I merged the changes into a test 2.2.5 instance and limited testing showed it worked correctly.

I'm going to close this issue.