Opened 5 years ago
Last modified 5 years ago
#49171 new defect (bug)
Trying to get property 'post_type' of non-object in wp-includes/link-template.php on line 682
Reported by: | ronald2020 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Feeds | Keywords: | needs-patch |
Focuses: | template | Cc: |
Description
Hi there,
I believe this maybe a bug or at least an unchecked condition (post/page does not exist) throwing the above error. I have legit crawlers visiting that cause these errors.
Running 5.3.2. All plugins disabled (except for Health Check & Troubleshooting). Theme: Twenty.
How to re-produce : https://your.site.com/news2020/feed/atom/
It is key that the slug for the post/page does NOT (NO longer) exists.
Stack trace:
- {main}() /Users/me/root/index.php:0
- require() /Users/me/root/index.php:17
- require_once() /Users/me/root/wp-blog-header.php:19
- do_action() /Users/me/root/wp-includes/template-loader.php:13
- WP_Hook->do_action() /Users/me/root/wp-includes/plugin.php:478
- WP_Hook->apply_filters() /Users/me/root/wp-includes/class-wp-hook.php:312
- redirect_canonical() /Users/me/root/wp-includes/class-wp-hook.php:288
- is_front_page() /Users/me/root/wp-includes/canonical.php:498
- WP_Query->is_front_page() /Users/me/root/wp-includes/query.php:456
- WP_Query->is_page() /Users/me/root/wp-includes/class-wp-query.php:3879
PHP Notice: Trying to get property 'post_type' of non-object in /Users/me/root/wp-includes/link-template.php on line 682
A variant (same sort of problem) throws an error in class-wp-query.php with the following:
https://your.site.com/news2020/feed/
Note: See
TracTickets for help on using
tickets.
You can find more information on this particular bit on this ticket: https://core.trac.wordpress.org/ticket/29660