[wp-trac] [WordPress Trac] #62547: Notice for _load_textdomain_just_in_time despite correct use of init hook

WordPress Trac noreply at wordpress.org
Sat Nov 23 12:23:58 UTC 2024


#62547: Notice for _load_textdomain_just_in_time despite correct use of init hook
-----------------------------+-------------------------
 Reporter:  markhowellsmead  |       Owner:  swissspidy
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  I18N             |     Version:  trunk
 Severity:  normal           |  Resolution:  worksforme
 Keywords:                   |     Focuses:
-----------------------------+-------------------------
Changes (by swissspidy):

 * status:  assigned => closed
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 This code alone does not trigger this notice.

 You are probably calling `__()` somewhere else in your mu-plugin earlier
 than `init`. As per https://make.wordpress.org/core/2024/10/21/i18n-
 improvements-6-7/, tools like Query Monitor are a snippet like the
 following one can help you pinpoint the exact location:

 {{{
 add_action(
         'doing_it_wrong_run',
         static function ( $function_name ) {
                 if ( '_load_textdomain_just_in_time' === $function_name )
 {
                         debug_print_backtrace();
                 }
         }
 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62547#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list