[wp-trac] [WordPress Trac] #60988: Many PHP warnings in Apache error log when opening any page or post for edition in wp-admin

WordPress Trac noreply at wordpress.org
Wed Apr 10 22:06:52 UTC 2024


#60988: Many PHP warnings in Apache error log when opening any page or post for
edition in wp-admin
--------------------------+------------------------
 Reporter:  dailymatrix   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------
Description changed by sabernhardt:

Old description:

> After upgrading to 6.5, and still on 6.5.2, when opening any page or post
> for edition in wp-admin, I'm getting many php warnings in the Apache
> error log referring to wp-includes/rest-api/endpoints/class-wp-rest-
> templates-controller.php.
>
> However, it does not seem, so far, to have any noticeable effect in the
> normal edition workflow.
>
> Specifications:
> Ubuntu 22.04.4 LTS
> Apache/2.4.58
> PHP 8.2.17
>
> Here, an excerpt from the log:
>
> [Wed Apr 10 20:03:15.663768 2024] [proxy_fcgi:error] [pid XXXXX:tid
> XXXXXXXXXXXXXXXXX] [remote XXXXXXXXXXXXXXXXXX] AH01071: Got error 'PHP
> message: PHP Warning:  Attempt to read property "id" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 647;
> PHP message: PHP Warning:  Attempt to read property "theme" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 651;
> PHP message:PHP Warning:  Attempt to read property "content" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 658;
> PHP message: PHP Warning:  Attempt to read property "content" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 662;
> PHP message: PHP Warning:  Attempt to read property "slug" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 666;
> PHP message: PHP Warning:  Attempt to read property "source" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 670;
> PHP message: PHP Warning:  Attempt to read property "origin" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 674;
> PHP message: PHP Warning:  Attempt to read property "type" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 678;
> PHP message: PHP Warning:  Attempt to read property "description" on null
> in /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-
> templates-controller.php on line 682;
> PHP message: PHP Warning:  Attempt to read property "title" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 690;
> PHP message: PHP Warning:  Attempt to read property "wp_id" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 694;
> PHP message: PHP Warning:  Attempt to read property "title" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 698;
> PHP message: PHP Warning:  Attempt to read property "status" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 703;
> PHP message: PHP Warning:  Attempt to read property "wp_id" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 707;
> PHP message: PHP Warning:  Attempt to read property "has_theme_file" on
> null in /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-
> templates-controller.php on line 711;
> PHP message: PHP Warning:  Attempt to read property "type" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 714;
> PHP message: PHP Warning:  Attempt to read property "author" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 719;
> PHP message: PHP Warning:  Attempt to read property "modified" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 727;
> PHP message: PHP Warning:  Attempt to read property "type" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 769;
> PHP message: PHP Warning:  Attempt to read property "type" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 769;
> PHP message: PHP Warning:  Attempt to read property "author" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 829;
> PHP message: PHP Warning:  Attempt to read property "type" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
> controller.php on line 769;
> PHP message: PHP Warning:  Attempt to read property "type" on null in
> /var/www/mysite/wp-includes/rest-api/endpoints/ .......(many more)',
> referer: https://mysite.com/wp-
> admin/post.php?post=11209&action=edit&lang=es

New description:

 After upgrading to 6.5, and still on 6.5.2, when opening any page or post
 for edition in `wp-admin`, I'm getting many PHP warnings in the Apache
 error log referring to `wp-includes/rest-api/endpoints/class-wp-rest-
 templates-controller.php`.

 However, it does not seem, so far, to have any noticeable effect in the
 normal edition workflow.

 Specifications:
 Ubuntu 22.04.4 LTS
 Apache/2.4.58
 PHP 8.2.17

 Here, an excerpt from the log:
 {{{
 [Wed Apr 10 20:03:15.663768 2024] [proxy_fcgi:error] [pid XXXXX:tid
 XXXXXXXXXXXXXXXXX] [remote XXXXXXXXXXXXXXXXXX] AH01071: Got error 'PHP
 message: PHP Warning:  Attempt to read property "id" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 647;
 PHP message: PHP Warning:  Attempt to read property "theme" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 651;
 PHP message:PHP Warning:  Attempt to read property "content" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 658;
 PHP message: PHP Warning:  Attempt to read property "content" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 662;
 PHP message: PHP Warning:  Attempt to read property "slug" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 666;
 PHP message: PHP Warning:  Attempt to read property "source" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 670;
 PHP message: PHP Warning:  Attempt to read property "origin" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 674;
 PHP message: PHP Warning:  Attempt to read property "type" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 678;
 PHP message: PHP Warning:  Attempt to read property "description" on null
 in /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 682;
 PHP message: PHP Warning:  Attempt to read property "title" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 690;
 PHP message: PHP Warning:  Attempt to read property "wp_id" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 694;
 PHP message: PHP Warning:  Attempt to read property "title" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 698;
 PHP message: PHP Warning:  Attempt to read property "status" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 703;
 PHP message: PHP Warning:  Attempt to read property "wp_id" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 707;
 PHP message: PHP Warning:  Attempt to read property "has_theme_file" on
 null in /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-
 templates-controller.php on line 711;
 PHP message: PHP Warning:  Attempt to read property "type" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 714;
 PHP message: PHP Warning:  Attempt to read property "author" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 719;
 PHP message: PHP Warning:  Attempt to read property "modified" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 727;
 PHP message: PHP Warning:  Attempt to read property "type" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 769;
 PHP message: PHP Warning:  Attempt to read property "type" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 769;
 PHP message: PHP Warning:  Attempt to read property "author" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 829;
 PHP message: PHP Warning:  Attempt to read property "type" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/class-wp-rest-templates-
 controller.php on line 769;
 PHP message: PHP Warning:  Attempt to read property "type" on null in
 /var/www/mysite/wp-includes/rest-api/endpoints/ .......(many more)',
 referer: https://mysite.com/wp-
 admin/post.php?post=11209&action=edit&lang=es
 }}}

--

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


More information about the wp-trac mailing list