• Resolved Efs

    (@stevendigital)


    Hello,

    Recently I came accross this warning:

    [2024-11-28 18:21:48] PHP Warning: Attempt to read property "post_author" on null in /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php on line 326
    Stack trace:
    #0 /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php(326): bac_error_handler()
    #1 /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php(277): get_author()
    #2 /wp-includes/class-wp-hook.php(324): article_author()
    #3 /wp-includes/class-wp-hook.php(348): apply_filters()
    #4 /wp-includes/plugin.php(565): do_action()
    #5 /wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(90): do_action_ref_array()
    #6 /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php(74): do_action()
    #7 /wp-includes/class-wp-hook.php(324): output_tags()
    #8 /wp-includes/class-wp-hook.php(348): apply_filters()
    #9 /wp-includes/plugin.php(565): do_action()
    #10 /wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(90): do_action_ref_array()
    #11 /wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(180): do_action()
    #12 /wp-includes/class-wp-hook.php(324): head()
    #13 /wp-includes/class-wp-hook.php(348): apply_filters()
    #14 /wp-includes/plugin.php(517): do_action()
    #15 /wp-includes/general-template.php(3064): do_action()
    #16 /wp-content/themes/woodmart/header.php(12): wp_head()
    #17 /wp-includes/template.php(810): require_once()
    #18 /wp-includes/template.php(745): load_template()
    #19 /wp-includes/general-template.php(48): locate_template()
    #20 /wp-content/themes/woodmart/page.php(15): get_header()
    #21 /wp-includes/template-loader.php(106): include()
    #22 /wp-blog-header.php(19): require_once()
    #23 /index.php(17): require()

    Can you explain a bit more why this happens and how this can be fixed?

    Best Regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @stevendigital,

    Thank you for contacting Rank Math support.

    Please make sure that you are using the latest version of our plugin: https://rankmath.com/changelog/

    Also, please confirm if the warning appears on a specific post/page.

    Looking forward to helping you.

    Thread Starter Efs

    (@stevendigital)

    Hello,

    To answer your questions:

    1. I use the latest version of the rank math seo plugin.
    2. The warning message does not appear on a specific page. This log appeared on the debug log. There is no specific action that is atteched to it.

    I hope this information help.

    Best Regards

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @stevendigital,

    Please add the following code on line 326 of the file:
    /wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php

    error_log(get_queried_object_id());

    After doing that, when the error appears again it will also show the ID of the page causing this and then we can pinpoint exactly why that is happening.

    Looking forward to hearing back from you.

    Thread Starter Efs

    (@stevendigital)

    Ok. I have implemented the error log. I will let you know, as soon as I have the results.

    Please keep this ticket open.

    Best Regards

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @stevendigital,

    Sure, let us know once the error gets logged again with the page ID triggering it.

    Looking forward to helping you.

    Thread Starter Efs

    (@stevendigital)

    Some IDs came up in the error log. One ID was a 404 page (a page that can be set from the theme settings) and the other ID that appears is the cart page.

    Also, the error below appeared also for post_content, property “ID”, comment_count, and post_parent :

    PHP Warning: Attempt to read property "post_date" on null in /wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 767
    #1 wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php(140): get_parts()
    #2 /var/www/vhosts/CLASS-WP-HOOK.PHP(324): json_ld()
    #3 /var/www/vhosts/CLASS-WP-HOOK.PHP(348): apply_filters()
    #4 /var/www/vhosts/PLUGIN.PHP(565): do_action()
    #5 /var/www/vhosts/seo-by-rank-math/includes/traits/CLASS-HOOKER.PHP(90): do_action_ref_array()
    #6 /var/www/vhosts/seo-by-rank-math/includes/frontend/CLASS-HEAD.PHP(180): do_action()
    #7 /var/www/vhosts/CLASS-WP-HOOK.PHP(324): head()
    #8 /var/www/vhosts/CLASS-WP-HOOK.PHP(348): apply_filters()
    #9 /var/www/vhosts/PLUGIN.PHP(517): do_action()
    #10 /var/www/vhosts/GENERAL-TEMPLATE.PHP(3064): do_action()
    #11 /var/www/vhosts/themes/woodmart/header.php(12): wp_head()
    #12 /var/www/vhosts/template.PHP(810): require_once()
    #13 /var/www/vhosts/template.PHP(745): load_template()
    #14 /var/www/vhosts/GENERAL-TEMPLATE.PHP(48): locate_template()
    #15 /var/www/vhosts/themes/woodmart/page.php(15): get_header()
    #16 /var/www/vhosts/template-loader.PHP(106): include()
    #17 /var/www/vhosts/WP-BLOG-HEADER.PHP(19): require_once()
    #18 /var/www/vhosts/index.PHP(17): require()

    The odd thing is that the IDs of the pages that I refer to above are not after these errors but appear around 1000 lines below.

    Let me know your thoughts.

    Best Regards

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @stevendigital,

    We will have to check this further on your site. Please check this guide to get in touch with our tech support team so they can assist you further: https://www.ads-software.com/support/topic/attention-read-this-before-posting/

    Thank you.

    Thread Starter Efs

    (@stevendigital)

    Hello, @rankmathsupport ,

    I read the article that you pasted above. Should I open a ticket in the support forums of rank math seo, or is there any way to contact the support throught out a form or another way, to point them here. Because it is a bit unclear to me, on the article that you posted.

    Best Regards

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @stevendigital,
    ?
    Yes, please open a topic in our support forum so our development team can check this further.
    ?
    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.