[wp-trac] [WordPress Trac] #60909: Classic Theme with theme.json attempts to load templates
WordPress Trac
noreply at wordpress.org
Wed Apr 3 14:42:37 UTC 2024
#60909: Classic Theme with theme.json attempts to load templates
----------------------------+-----------------------------
Reporter: CookiesForDevo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.5
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
With 6.5 if a classic theme has a theme.json, editing a post/page attempts
to load templates resulting in a bevy of php warnings with the `$template`
var being null inside
[https://core.trac.wordpress.org/browser/tags/6.5/src/wp-includes/rest-
api/endpoints/class-wp-rest-templates-controller.php#L637
prepare_item_for_response].
Tested with `twentynineteen` and adding a theme.json with only the version
number.
{{{
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "id" on
null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 647
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "theme"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 651
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property
"content" on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-
templates-controller.php on line 658
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property
"content" on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-
templates-controller.php on line 662
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "slug"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 666
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "source"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 670
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "origin"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 674
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "type"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 678
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property
"description" on null in /app/wp-includes/rest-api/endpoints/class-wp-
rest-templates-controller.php on line 682
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "title"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 690
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "wp_id"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 694
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "title"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 698
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "status"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 703
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "wp_id"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 707
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property
"has_theme_file" on null in /app/wp-includes/rest-api/endpoints/class-wp-
rest-templates-controller.php on line 711
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "type"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 714
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "author"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 719
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property
"modified" on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-
templates-controller.php on line 727
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "type"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 769
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "author"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 829
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "type"
on null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 769
[03-Apr-2024 13:59:04 UTC] PHP Warning: Attempt to read property "id" on
null in /app/wp-includes/rest-api/endpoints/class-wp-rest-templates-
controller.php on line 746
[03-Apr-2024 13:59:04 UTC] PHP Deprecated: explode(): Passing null to
parameter #2 ($string) of type string is deprecated in /app/wp-includes
/block-template-utils.php on line 1076
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60909>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list