## My theme is full of error messages in the “Customize” screen, but nowhere else

Question

I’m making a custom WordPress theme. At some point, the “Customize” page in the admin panel has completely broken, giving me tons of these errors:

Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2233

Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2237

Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2243

Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2247

Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2251

Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2255

Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2260

Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2264

Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2269


My page seems to work just fine otherwise, I don’t get any warnings anywhere else.

How do I even begin to debug this?

0
2 months 2022-12-20T16:04:32-05:00 0 Answers 0 views 0