[wp-trac] [WordPress Trac] #34653: TypeError: undefined is not an object (evaluating '$pass1Text.prop')

WordPress Trac noreply at wordpress.org
Tue Nov 10 23:15:16 UTC 2015


#34653: TypeError: undefined is not an object (evaluating '$pass1Text.prop')
-----------------------------+-----------------------------------
 Reporter:  johnjamesjacoby  |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Users            |    Version:  4.3
 Severity:  normal           |   Keywords:  2nd-opinion has-patch
  Focuses:  javascript       |
-----------------------------+-----------------------------------
 I'm trying to enqueue the `user-profile` script (see: `wp-admin/js/user-
 profile.js`) in the [https://wordpress.org/plugins/wp-user-profiles/ WP
 User Profiles] plugin, but outside of WordPress's traditional contexts, a
 Javascript error occurs that causes all other scripts to halt.

 This happens in my plugin because (unlike WordPress core) not all user
 profile fields are displayed on the page at the same time, so the
 `bindPass1()` function fails to set the `$pass1Text` variable. It's
 expected in WordPress that these fields always exist when this script is
 enqueued.

 The code in question was introduced as part of the updated strong password
 generator in WordPress 4.3. Previous to 4.3, enqueuing this script in the
 above context worked OK.

 I don't exactly consider this a bug, but a small improvement to the `user-
 profile` script will make it possible to reuse this code in other places
 that are still relevant to a "user profile" area (BuddyPress, bbPress,
 etc...)

 First pass patch incoming.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34653>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list