• Resolved Tim Reeves

    (@tim-reeves)


    WP 6.5.2 + Rank Math 1.0.216 + PHP 8.1 causing warnings in the PHP-FPM log:

    [11-Apr-2024 01:09:57] WARNING: [pool alexander.vc] child 18418 said into stderr: “PHP message: PHP Warning: Array to string conversion in /var/www/vhosts/alexander.vc/httpdocs/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 606”

    The page I need help with: [log in to see the link]

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

    (@rankmathsupport)

    Hello @tim-reeves,

    Thank you for contacting Rank Math support.

    This issue usually happens when the archive page is not able to fetch the image from the first post/product of that archive to set it as the og:image.

    In this case, please make sure that all the custom post types on the website have a fallback thumbnail for Facebook under WordPress Dashboard > Rank Math > Titles & Meta settings and see if that works for you.

    Let us know how that goes. Looking forward to helping you.

    Thread Starter Tim Reeves

    (@tim-reeves)

    Thanks for your prompt help. I looked through ALL the settings under “Titles & Meta” and made sure that there was a default image set, and explicit images where an input field was available. However, the problem remains. I did notice the problem-causing request:

    request: “GET /podcast/ HTTP/2.0”

    Looking at the title and meta settings, there is Category (light grey background) of “Post + Podcast”, with the available categories Keywords and Podcasts, but neither of these offer an image setting, only Archive Title and Archive Description.

    So I’m a bit stumped…

    Could you not simply protect class-image.php from causing the warning?

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tim-reeves,

    Let’s try using the following filter code to disable the fallback image functionality:
    add_filter( 'rank_math/opengraph/pre_set_content_image', '__return_true' );
    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    If that doesn’t work, head over to your WP Dashboard > Rank Math > Status & Tools > System Status and click the “Copy System Info to Clipboard” button, and paste it here so we can further analyze the issue.

    Looking forward to helping you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Warning array to String’ is closed to new replies.