PHP Warning: Undefined array key “titleWrapper”

#807042
  • Resolved Anonymous
    Rank Math free

    I am getting this error:
    FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “titleWrapper” in /httpdocs/wp-content/plugins/seo-by-rank-math/includes/modules/schema/blocks/toc/class-block-toc.php on line 103″ while reading response header from upstream

    When I googled it, it seems that it is common for other sites (their error logs are printing to their pages).
    Is this a known issue?
    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    We have already identified this issue and reported it to our development team. We will include a fix in a future update of the plugin.

    For now, please replace the code on line 103 of this specific file seo-by-rank-math/includes/modules/schema/blocks/toc/class-block-toc.php with the code below:

    
    $title_wrapper = isset( $parsed_block['attrs']['titleWrapper'] ) && in_array( $parsed_block['attrs']['titleWrapper'], $allowed_tags, true ) ? $parsed_block['attrs']['titleWrapper'] : 'h2';

    That notice should go away.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Anonymous
    Rank Math free

    how do we chnage the cose to solve this in a WordPress site?

    Hello,

    You edit the plugin file from WP Dashboard > Plugins > Plugin File Editor and select the file mentioned by my colleague to change the code.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Anonymous
    Rank Math free

    Hi there’s no plugin file editor I can see in WordPress dashboard?

    Hello,

    In that case, you need to use the FTP access provided by the hosting provider or the administration panel on your server to locate the file and make the necessary changes.

    Thank you.

    Hello,

    We have released a Beta update that fixed the issue.

    Please enable the Beta update by following this guide below:
    https://rankmath.com/kb/version-control/#beta-updates

    beta update

    If you are unable to see an update, please clear Rank Math’s transients from:
    WordPress Dashboard > Rank Math > Status & Tools > Database Tools > Remove Rank Math Transients > Remove transients
    remove transients rank math

    Please clear the caches, server, and WordPress after updating.

    You can disable the Beta updates once you update to the latest version and the issue is fixed.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘PHP Warning: Undefined array key “titleWrapper”’ is closed to new replies.