• dimal

    (@dimalifragis)


    Hi,

    I have started to use this plugin with Geodirectory. I see some warnings in the logs, not sure why.

    Am i doing something wrong or it is some php version issue?

    I’m not using the Gutenberg block for breadcrumbs but php code (per your example) injected.

    [02-Feb-2024 17:07:57 UTC] PHP Warning: Undefined property: WP_Post_Type::$ID in /home/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.php on line 219

    [02-Feb-2024 17:07:57 UTC] PHP Warning: Undefined property: WP_Post_Type::$ID in /home/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.php on line 218

    [02-Feb-2024 17:07:57 UTC] PHP Warning: Undefined property: WP_Post_Type::$ID in /home/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.php on line 215

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Havlik

    (@mtekk)

    Based on where the warning is occurring, it sounds like something is changing the queried object to be of type WP_Post_Type instead of the expected WP_User for an author archive page. I’ll add a check for the expected object type. That said, you may want to chase down why the queried object is of the wrong type for an author archive page if you care about the breadcrumb trail being correct on those pages.

    • This reply was modified 9 months, 3 weeks ago by John Havlik.
    Thread Starter dimal

    (@dimalifragis)

    Thanks for the reply.

    Tried to replicate it so i know WHEN it happens. The only place it happens is Geodirectoy Author page, the page of your dashboard that lists all YOUR posts.

    url -> /author/userz/places/

    And i think it is because there are some “Author:” empty after that and also “Articles by” empty after that. Maybe an issue of Geo Directory.

    Nowhere else. So it is not an issue for me, and i guess (?) it doesn’t create anything bad, since that page is shown only to logged in user IF he has some Geodirectory listings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HP Warning: Undefined property: WP_Post_Type’ is closed to new replies.