PHP Fatal Errors with Schema Enabled with Theme

#63846
  • Resolved Self Craft
    Rank Math free

    We just installed and activated the Rank Math plugin for the first time today and ran into PHP Fatal Errors with the Schema features enabled.

    With the Rank Math plugin Schema Enabled with our primary theme I am unable to edit pages in wp admin, though the pages still load correctly for viewing.
    “There has been a critical error on your website. Please check your site admin email inbox for instructions.”

    I am able to QuickEdit without issue. Please let me know if there’s additional information I can provide.
    Our plugins, theme files, and wordpress are all on the latest versions.

    If I activate the Twenty Twenty theme editing pages becomes possible and the errors do not persist.
    Or
    If I disable Schema in the Rank Math plugin editing pages becomes possible and the errors do not persist with our primary theme active.

    From the WP Debug log (edited):

    PHP Notice:  CMB2_Field::__construct() was called with a parameter that is <strong>deprecated</strong> since version 2.2.3! Using the "default" field parameter as a callback has been deprecated in favor of the "default_cb" parameter. in .../seo-by-rank-math/vendor/cmb2/cmb2/includes/CMB2_Base.php on line 456
    PHP Warning:  strpos() expects parameter 1 to be string, object given in .../wp-includes/shortcodes.php on line 199
    PHP Warning:  preg_match_all() expects parameter 2 to be string, object given in .../wp-includes/shortcodes.php on line 208
    PHP Warning:  array_intersect(): Argument #2 is not an array in ../themes/global/shortcodes.php on line 209
    PHP Recoverable fatal error:  Object of class CMB2_Field could not be converted to string in .../themes/global/shortcodes.php
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    It looks like your theme is adding some function without proper prefixing it. As per the WordPress guidelines all the functions in your theme should be prefixed with the theme_name.

    A couple of users had also reported this issue in the past. Prefixing the theme functions had fixed the issue for them. Can you also check and prefix all the functions in your theme?

    I hope that helps.

    Just so I understand, you’re referring to this when you mention proper prefixing in the theme?

    Hello,

    Yes that should do it. I’d recommend to have your theme developer help you in fixing this.

    Looking forward to helping you. Thank you

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    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 5 replies - 1 through 5 (of 5 total)

The ticket ‘PHP Fatal Errors with Schema Enabled with Theme’ is closed to new replies.