Closed
Description
Preconditions
- Magento 2.3.6
- Utilize a JavaScript bundling system (our system uses Advanced Bundling)
- Utilize a theme based on theme-frontend-blank
- Ensure your bundling system is loading the requirejs config in an element in the
- mage/mage should be loaded in the same file that applies the requirejs config
Steps to reproduce
- Load a webpage
- Place a breakpoint on
$("body").on("contentUpdated", function() {
- Hard refresh the webpage
NOTE: This does not always work due to a race condition
Expected result
document.getElementsByTagName('body').length
is 1
Actual result
- In some cases,
document.getElementsByTagName('body').length
is not 1
Technical Notes
In environments where there are fewer JavaScript files that can be loaded fast enough, mage/mage
can be triggered quick to execute before a <body>
tag exists in the DOM.
This is due to it being a dependency of, at least, Magento_Theme/js/theme
in the blank theme - which is set as a global dependency by the requirejs-config.js
file in that theme.
Previous ticket was reported in 2017: #10360
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Affects critical data or functionality and forces users to employ a workaround.Major restrictions or short-term circumventions are required until a fix is available.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Type
Projects
Status
Done