Skip to content

Fatal Error: mb_strtoupper() undefined in schema/article.php when using Cyrillic content #22244

@rkdevox

Description

@rkdevox
  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

When using the Yoast SEO plugin in WordPress, adding certain non-Latin characters (e.g., Cyrillic) in the Gutenberg editor results in a fatal error due to a missing PHP function. This breaks the front-end rendering and schema generation.


To Reproduce

Step-by-step reproduction instructions

  1. Use WordPress with the Yoast SEO plugin enabled.

  2. Open the Gutenberg editor.

  3. Add this text to the post content: За здоровье!

  4. Save and publish the post.

  5. Attempt to visit the front-end of the post.


Expected results

Yoast should gracefully handle multibyte content or verify that required PHP extensions (like mbstring) are enabled before calling functions like mb_strtoupper().


Actual results

A fatal error is thrown:

  • Uncaught Error: Call to undefined function mb_strtoupper()
    in /var/www/xyz.com/wp-content/plugins/wordpress-seo/src/generators/schema/article.php on line 230

This prevents the post from loading properly on the frontend.


Screenshot

Image


Technical info

  • If relevant, which editor is affected:

    • Block Editor
    • Gutenberg Editor
    • Elementor Editor
    • Classic Editor
    • Other:
  • Which browser is affected:

    • Chrome
    • Firefox
    • Safari
    • Other:

Used versions

  • Device you are using: Laptop
  • Operating system: Windows 10
  • PHP version: 8.0
  • WordPress version: 6.8.1
  • WordPress Theme: Custom theme
  • Yoast SEO version: 25.0
  • Gutenberg plugin version: 20.7.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions