Closed
Description
Preconditions (*)
- Magento
2.3.5-p1
. Most likely any recent release would be affected.
Steps to reproduce (*)
- Create a custom RequireJS config which defines a component complete with its url and fallback path. For example:
var config = {
paths: {
a: ['https://example.com/advertisement.js', 'Custom_Module/js/noop']
}
};
- Include this component on Checkout (may be reproducible elsewhere)
<!-- Something simple like this would work: -->
<script type="text/x-magento-init">
{
"*": {
"a": {}
}
}
</script>
- Use a browser with any aggressive Ad Blocker extension which would block the required url
- Open Checkout page
Expected result (*)
- ✅ Ad Blocker extension blocks the script download from the url stated in RequireJS config (
https://example.com/advertisement.js
) - ✅ Checkout page loads and renders just fine
Actual result (*)
- ✅ Ad Blocker Extension blocks script download from the original url
- ℹ️ RequireJS uses path fallback mechanism to load a resource from second url, therefore not triggering an error.
- ℹ️ Magento's RequireJS resolver cannot keep track of such events and continues to wait for original resource to load (as no error was produced), therefore not calling any of the callbacks.
- ❌ Checkout page is displaying 2 spinning loaders and a fully rendered page under it as resolver does not track components which were loaded via fallbacks.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.Has been reviewed and prioritized during Triage with Product Managers
Type
Projects
Status
Done