[wp-trac] [WordPress Trac] #45469: wp-polyfill-formdata not found for subdirectory install
WordPress Trac
noreply at wordpress.org
Mon Dec 3 14:34:08 UTC 2018
#45469: wp-polyfill-formdata not found for subdirectory install
---------------------------+---------------------
Reporter: bobbingwide | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Script Loader | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+---------------------
Comment (by swissspidy):
@gziolo You mean in `wp_default_packages_scripts()`. That should be
covered by `\WP_Scripts::do_item()`, which automatically adds the base URL
if it's a relative path.
With that being said, [attachment:"45469.patch"] is more similar to
`\WP_Scripts::do_item()` in that regard.
However, if someone uses `wp_get_script_polyfill()` with their own
scripts, it would just needlessly append the base URL.
This could be solved by always assuming the `src` is a full URL (like
[attachment:"45469.diff"] does) or by using the same regex as
`\WP_Scripts::do_item()`.
Plus, we should probably add `?ver` as well for cache busting.
See [attachment:"45469.2.diff"] for another approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45469#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list