[wp-trac] [WordPress Trac] #58185: Lazy load site meta
WordPress Trac
noreply at wordpress.org
Wed May 17 20:52:03 UTC 2023
#58185: Lazy load site meta
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner:
| spacedmonkey
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.3
Component: Networks and Sites | Version: 5.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: multisite,
needs-dev-note | performance
-------------------------------------------------+-------------------------
Changes (by ryelle):
* status: closed => reopened
* resolution: fixed =>
Comment:
There's still something broken on wp.org, I imagine because the file
included in `wp-settings.php` is not conditional, so loading the file when
it's requested in sunrise creates the class before it's redeclared by the
wp-settings import.
{{{
( ! ) Fatal error: Cannot declare class WP_Metadata_Lazyloader, because
the name is already in use in wp-includes/class-wp-metadata-lazyloader.php
on line 32
Call Stack
# Time Memory Function Location
1 0.0001 368944 {main}( ) .../index.php:0
2 0.0001 369224 require( 'wp-blog-header.php ) .../index.php:18
3 0.0001 369832 require_once( 'wp-load.php ) .../wp-blog-
header.php:13
4 0.0001 370560 require_once( 'wp-config.php ) .../wp-load.php:50
5 0.0007 403656 require_once( 'wp-settings.php ) .../wp-
config.php:119
}}}
Commenting out the `require ABSPATH . WPINC . '/class-wp-metadata-
lazyloader.php';` in wp-settings fixes the issue, but I don't know if that
would have other effects.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58185#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list