-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix for requireJS loading issues (for ad blockers) #13061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Is it a common practice in Magento code to call console like |
It seems there's a consoleLogger yes, let me fix this code style issue and integrate with the existing consoleLogger. |
Hi, @Yonn-Trimoreau. I agree with @orlangur that we must use wrapper, but unfortunately it's located in UI module and we can't depend on modules from |
@omiroshnichenko, I've quickly grepped following code snippet
should |
@omiroshnichenko Done |
@orlangur I also found this code snippet, but I can't found place where |
@orlangur @omiroshnichenko Since this bit of code will apply to all required scripts (through Maybe using |
@Yonn-Trimoreau Currently, we cannot get current mode in JS. So use |
@omiroshnichenko I still would like to add a check on window.console.error, as I could see in |
This fix does not work; manually applied to 2.2.3, Safari 11.1, Mac High Sierra |
Please read #12828
Description
When uBlock (or any ad blocker) forbids
trackingCode.js
file from loading, the exception thrown by RequireJS breaks the JS execution flow, causing unexpected and random issues elsewhere on the website.This fix catches the RequireJS script loading error, displays it in the console as is and returns true, to avoid execution flow to be broken.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist
PS: could not provide unit/integration tests since it's raised by a browser extension