• Resolved hoseinkh

    (@hoseinkh)


    Hi,

    When enabling debugging, this error is displayed from the Rank Meth plugin.

    [05-Jul-2024 18:38:18 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/website/domains/domain.com/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 510

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

    (@rankmathsupport)

    Hello @hoseinkh,
    ?
    Thank you for contacting Rank Math and bringing your concern to our attention. We’re sorry for any inconvenience this issue may have caused you.
    ?
    Your shop page is built on the Elementor template, and even if it is being identified as a shop page, it doesn’t contain a post ID, which is why Rank Math was unable to go through with the intended procedure and was trying to set an image to OpenGraph image from the post content.
    ?
    In this case, please add the following filter on your website and see if that works for you:
    ?
    add_filter('rank_math/opengraph/pre_set_content_image', function ($return) { if (is_shop()) { return true; } });
    ?
    Here’s how you can add filter/hook to your WordPress site:?https://rankmath.com/kb/wordpress-hooks-actions-filters/
    ?
    Hope that helps.
    ?
    Thank you.

    Thread Starter hoseinkh

    (@hoseinkh)

    Hi again

    You were right and now the error is completely resolved. Before I reported this to you, the store page on my website was constantly disabled and if I selected the store page from this section, it was automatically removed from this section again. Also, on the front page of the store, “page not found” was displayed in the address bar of the browser.

    Anyway, after adding your code, the problem is completely solved. I hope it will be completely solved in the next versions of rank math.

    thanks

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Glad that the issue has been sorted, @hoseinkh!
    ?
    Don’t hesitate to get in touch if you have any additional questions.
    ?
    We are here to help!

    Thread Starter hoseinkh

    (@hoseinkh)

    Thanks a lot, will this be fixed natively in the next version? Because many users are facing this problem.

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @hoseinkh,
    ?
    Our developers are already aware of this issue with templates.
    ?
    We will notify everyone via the usual communication channels once this is added to our latest update.
    ?
    You can also keep an eye on our changelog here:
    https://rankmath.com/changelog/
    ?
    Looking forward to helping you.

    Thread Starter hoseinkh

    (@hoseinkh)

    Hi again @rankmathsupport,

    Unfortunately, this problem occurs again. The shop page is constantly disabled and the error “page not found” is displayed in the title of the shop page.

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @hoseinkh,
    ?
    Can you please confirm if you have added the filter code we shared in your theme functions.php file? If you did, then it is possible that the code was removed due to a theme update.
    ?
    Please let us know. Looking forward to helping you.

    Thread Starter hoseinkh

    (@hoseinkh)

    Hi again,

    If I’m not mistaken, this bug was fixed in the last two versions of Rank Meth. So I removed the code and everything was working fine. After updating to the new version, this bug occurred again.

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @hoseinkh,
    ?
    Please get in touch with our development team by emailing us on [email protected]
    ?
    Looking forward to helping you.

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