[buddypress-trac] [BuddyPress Trac] #5972: Password strength meter's JS re-uses theme compat. asset handle
buddypress-trac
noreply at wordpress.org
Wed Oct 29 17:23:41 UTC 2014
#5972: Password strength meter's JS re-uses theme compat. asset handle
------------------------------------+-----------------
Reporter: DJPaul | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.2
Component: Theme / Template Parts | Version: 2.1
Severity: major | Keywords:
------------------------------------+-----------------
Per r8686, the `locate_asset_in_stack` method is used to fine a non-"core"
asset. A shortcoming of this implementation is how the method generates
the asset name; it's always one of "bp-child","bp-parent", "bp-legacy";
and the type of media (JS/CSS) is prepended to the end.
This works fine to load, for example, the main JS file from the bp-legacy
pack. However, when a second JS file is loaded, it uses the exact same
asset name, making the original unenqueue-able.
{{{
$filename = "password-verify{$min}.js";
// Locate the Register Page JS file
$asset = $this->locate_asset_in_stack( $filename, 'js' );
}}}
$asset ends up looking like this:
{{{
array (size=2)
'location' => string '../bp-legacy/js/password-verify.js' (length=97)
'handle' => string 'bp-legacy-js' (length=12)
}}}
This is blocking #5797 which is to make the asset name somehow
discoverable so that other developers can reliably un-enqueue these
scripts.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5972>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list