[wp-trac] [WordPress Trac] #64403: wp-auth-check.min.js: TypeError: h is undefined
WordPress Trac
noreply at wordpress.org
Sat Dec 13 19:10:59 UTC 2025
#64403: wp-auth-check.min.js: TypeError: h is undefined
--------------------------+-----------------------------------------
Reporter: ArtZ91 | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 7.0
Component: General | Version: 3.6
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript, administration
--------------------------+-----------------------------------------
Changes (by westonruter):
* keywords: reporter-feedback => needs-patch
* status: closed => reopened
* version: => 3.6
* resolution: worksforme =>
* milestone: => 7.0
Comment:
OK, I'm able to reproduce the issue, although not with the patch in
[comment:4].
This plugin re-creates the scenario:
{{{#!php
<?php
<?php
/**
* Plugin Name: Try Early Heartbeat Tick
*/
add_action(
'admin_enqueue_scripts',
static function () {
wp_add_inline_script(
'wp-auth-check',
'jQuery( document ).trigger( "heartbeat-tick", {
"wp-auth-check": false } );'
);
}
);
}}}
The issue is that the `heartbeat-tick` event may fire on the document
''before'' the `DOMContentLoad` event fires. This means that the code that
sets the `wrap` variable may in fact run ''after'' the event handler for
the `heartbeat-tick` event.
It looks like this was introduced a long time ago, in [23805] for #23295
with a refresh in [50547] which doesn't seem to have changed the
underlying problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64403#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list