Error when displaying SEO Score as a badge

#39638
  • Hi RM Team,

    I’m displaying the SEO Score as a badge on my pages. I’m using the shortcode in a Widget Template to do so but I have also tried without Template, just the Shortcode Widget and the error is the same. On the page, the Badge with the score is shown correctly, but above the Badge, there are 4 lines with 2 types of errors.

    Warning: Illegal string offset ‘class’ in …/plugins/seo-by-rank-math/includes/class-frontend-seo-score.php on line 260
    Warning: Cannot assign an empty string to a string offset in /plugins/seo-by-rank-math/includes/class-frontend-seo-score.php on line 260
    Warning: Illegal string offset ‘class’ in /plugins/seo-by-rank-math/includes/class-frontend-seo-score.php on line 263
    Warning: Illegal string offset ‘class’ in /plugins/seo-by-rank-math/includes/class-frontend-seo-score.php on line 263

    This is not urgent since I do not plan to show this live, just in the backend, but I guess you want to know about it. I expect you to let me know if there is anything I can do to help to reproduce the error.

    //Matthias

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

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

    I have been able to reproduce this problem on my end and this has been submitted to our dev team for closer investigation.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Todd
    Rank Math free

    Hi Matthias,

    I am sorry but the shortcode will only work in the content area of the page. It doesn’t work on the Widgets due to technical reasons.

    Please try using it in the post content itself.

    Update: I am sorry but it seems like it is happening even inside the content area. We have raised an issue regarding this we will release an update with a fix very soon. We would really appreciate your patience in this matter.

    • This reply was modified 4 years, 7 months ago by Todd. Reason: Updated the reply

    Hi Todd,

    Thanks for the update. I am using the Elementor Page Builder. It seems that it does not matter where I put the shortcode, I get an error. If I put it in a “normal” text block I get:

    Warning: Illegal string offset ‘class’ in …/seo-by-rank-math/includes/class-frontend-seo-score.php on line 260

    Warning: Cannot assign an empty string to a string offset in …/seo-by-rank-math/includes/class-frontend-seo-score.php on line 260

    Warning: Illegal string offset ‘class’ in …/plugins/seo-by-rank-math/includes/class-frontend-seo-score.php on line 263

    Warning: Illegal string offset ‘class’ in …/seo-by-rank-math/includes/class-frontend-seo-score.php on line 263

    (I’ve shortened all the URLs)

    As you know all Sections in Elementor are Widgets. That makes it impossible for me not to place it in one. I think, and I’m sure you will agree, that the documentation around this shortcode it lacking some critical information. Is there a way for me to use this shortcode in Elementor?

    Best regards (and keep up the great work on your plugin),

    //Matthias

    Hi Todd,

    No problem, glad you could reproduce the error and that a fix is on its way. Patience in this matter I have. It is not a critical feature, just practical and somewhat fun.

    //Matthias

    Hi Matthias,

    We really appreciate your patience in this 🙂

    Please let us know if we can help with any other issues!

    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 ‘Error when displaying SEO Score as a badge’ is closed to new replies.