Opened 12 years ago
Closed 12 years ago
#22111 closed defect (bug) (fixed)
wp_enqueue_script stopped loading scripts
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
I updated to 3.5-beta1-22104, and now my plugin styles are no longer being loaded. It's successfully enqueued, but is not being printed on the page. This is my code:
wp_enqueue_style('formidable-admin', FRM_URL. '/css/frm_admin.css', $frm_version);
Is this bug or has this changed?
Change History (9)
#2
in reply to:
↑ 1
@
12 years ago
Replying to nacin:
The fourth argument is version, not the third argument. The third argument is dependencies.
This is indeed related to a change in 3.5, but I thought we squashed this.
To clarify, just because the function was being called wrong, doesn't mean things should break when we can avoid it, if it previously worked.
#4
in reply to:
↑ 1
@
12 years ago
Replying to nacin:
The fourth argument is version, not the third argument. The third argument is dependencies.
This is indeed related to a change in 3.5, but I thought we squashed this. What is the exact value of $frm_version here?
var_dump()
would be perfect.
Thanks so much! I missed that in my digging.
Here's a version of that line that makes more sense:
wp_enqueue_style('formidable-admin', WP_PLUGIN_URL .'/formidable/css/frm_admin.css', '1.06.05');
#7
in reply to:
↑ 6
@
12 years ago
Replying to nacin:
To clarify, just because the function was being called wrong, doesn't mean things should break when we can avoid it, if it previously worked.
Replying to nacin:
I've re-opened #20683. We may need to back this out.
So we pass on an enhancement (i.e. revert it), because someone has a bug in his code? That the code worked previously was pure luck, wasn't it?
#8
@
12 years ago
The enqueueing and registering script/style methods have a rather complex method signature. These are understandable mistakes (I made the mistake in core, myself, breaking Plupload). A script that worked without incident in 3.4 should not suddenly disappear from the page in 3.5. It's a very cryptic bug that will cause a lot of developers a lot of headaches, and a lot of users a lot of broken sites.
Enhancements are often worth it. Here, this one is quite clearly not.
The fourth argument is version, not the third argument. The third argument is dependencies.
This is indeed related to a change in 3.5, but I thought we squashed this. What is the exact value of $frm_version here?
var_dump()
would be perfect.