[wp-trac] [WordPress Trac] #62244: Just-in-time translation loading for plugins/themes not in the directory

WordPress Trac noreply at wordpress.org
Wed Nov 27 09:28:27 UTC 2024


#62244: Just-in-time translation loading for plugins/themes not in the directory
--------------------------------------+-------------------------
 Reporter:  swissspidy                |       Owner:  swissspidy
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  6.8
Component:  I18N                      |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch needs-dev-note  |     Focuses:
--------------------------------------+-------------------------

Comment (by swissspidy):

 Another error reported in #62581 by @neo2k23:

 {{{
 Fatal error: Uncaught TypeError: basename(): Argument #1 ($path) must be
 of type string, Theme given in /home/public_html/wp-settings.php:686 Stack
 trace: #0 /home/public_html/wp-settings.php(686): basename(Object(Theme))
 #1 /home/wp-config.php(96): require_once('/home/...') #2 /home/public_html
 /wp-load.php(55): require_once('/home/..') #3 /home/public_html/wp-
 admin/admin.php(34): require_once('/home/...') #4 /home/public_html/wp-
 admin/about.php(10): require_once('/home/...') #5 {main} thrown in
 /home/public_html/wp-settings.php on line 686
 }}}

 `wp_get_active_and_valid_themes()` is supposed to return an array of
 strings. `Theme` is not a class that exists in WordPress.

 @neo2k23 are you using some special plugin/theme/drop-in that modifies the
 `$wp_stylesheet_path` or `$wp_template_path` globals or so? Where is the
 `Theme` class coming from in your project?

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


More information about the wp-trac mailing list