Opened 5 months ago
Closed 4 months ago
#64429 closed defect (bug) (fixed)
Script Modules: Dependencies inherit fetchpriority from not-enqueued, registered modules
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9.1 | Priority: | normal |
| Severity: | normal | Version: | 6.9 |
| Component: | Script Loader | Keywords: | has-patch has-unit-tests fixed-major |
| Focuses: | javascript | Cc: |
Description (last modified by )
In PR 10638 (comment), it was noticed that a script module's fetchpriority may increased to match its dependent's fetchpriority even if that module is not enqueued.
It seems that the dependency's fetchpriority should only increase when an enqueued dependent has a higher fetchpriority, not when any registered dependent has a higher fetchpriority.
[60931] added the logic for module dependencies to increase their fetch priority.
Change History (13)
This ticket was mentioned in PR #10651 on WordPress/wordpress-develop by @westonruter.
5 months ago
#2
- Keywords has-patch has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/64429
#3
@
5 months ago
- Milestone changed from Awaiting Review to 7.0
- Owner set to westonruter
- Status changed from new to accepted
- Version set to 6.9
No, this is not expected. Working on a fix.
#4
@
5 months ago
When WP_Script_Modules::print_script_module() was calculating the highest fetchpriority for its script module dependents, it was not considering whether those dependents were actually enqueued. Now it does.
Note the issue was not present for classic scripts.
Test cases have been added for scripts and script modules.
Ready for review: https://github.com/WordPress/wordpress-develop/pull/10651
#5
@
5 months ago
This isn't a critical issue but it was introduced in 6.9 and could be considered for a 6.9.x patch release.
#9
@
5 months ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Re-opening for 6.9 backport consideration.
@westonruter Do you recall if this was the expected behavior?