Opened 9 years ago
Closed 9 years ago
#34700 closed defect (bug) (fixed)
During installation, only enqueue scripts when necessary
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
The JS files enqueued during the installation routine are included in all the steps although they are not required in each one. This also creates some JS errors in the console.
Attachments (3)
Change History (14)
#2
follow-up:
↓ 7
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
This also creates some JS errors in the console.
user-profile.js?ver=4.4-beta4-35625-src-1447703485:202 Uncaught TypeError: Cannot read property 'prop' of undefined
#4
in reply to:
↑ 3
@
9 years ago
Replying to flixos90:
Sry, that should have been a reply to your "This also creates some JS errors" note.
This ticket was mentioned in Slack in #core by wonderboymusic. View the logs.
9 years ago
#7
in reply to:
↑ 2
;
follow-up:
↓ 8
@
9 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 4.4 to Future Release
- Version changed from trunk to 4.3
Replying to ocean90:
This also creates some JS errors in the console.
user-profile.js?ver=4.4-beta4-35625-src-1447703485:202 Uncaught TypeError: Cannot read property 'prop' of undefined
The error is gone with [35649].
34700.diff doesn't work always, because the first step can be 0 or 1: // Deliberately fall through if we can't reach the translations API.
#8
in reply to:
↑ 7
@
9 years ago
- Keywords has-patch added; needs-patch removed
Replying to ocean90:
34700.diff doesn't work always, because the first step can be 0 or 1:
// Deliberately fall through if we can't reach the translations API.
34700.2.diff should fix it.
#10
@
9 years ago
@flixos90 Step 2 needs the user-profile script too because it also shows the display_setup_form()
in case of errors.
Since wp_print_scripts()
supports an array we can build a list of scripts to enqueue, see 34700.3.diff.
this patch only prints the scripts when they're needed