• Resolved danial4578

    (@danial4578)


    Hello Rank Math Support,

    I’m using WordPress 7 and Rank Math SEO (free) v1.0.271.1. On the front-end, I’m seeing this PHP warning:

    Warning: Undefined array key "url" in
    /home/gameblad/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/snippets/class-author.php on line 41

    It looks like in RankMath\Schema\Author::process() the plugin accesses:

    $jsonld->parts['url']

    but in some requests the url key is not set in $jsonld->parts, so PHP 8+ triggers Undefined array key “url”.

    Expected behavior: no warnings should be output on the site.
    Suggestion: add an isset() / null-coalescing check and use a fallback URL when parts['url'] is missing (e.g. $data['WebPage']['@id'] or home_url('/')), before appending #author.

    Please let me know if you need any more details (page type where it happens, PHP version, debug log, etc.).
    Thank you.

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

Viewing 1 replies (of 1 total)
  • Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @danial4578,

    Thank you for contacting Rank Math support.

    Please navigate to WP Dashboard > Rank Math SEO > Titles & Meta > Author, make any small change, and save the settings.

    That should fix the issue. Let us know if it doesn’t.

    We are here to assist.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.