Rank Math OpenGraph Problem

#944807
  • Resolved Oğuzhan Ezber
    Rank Math free

    Hello, the following 3 pages on our website https://prepaship.com/tr/ are not opening and are giving errors:

    https://prepaship.com/tr/hakkimizda/
    https://prepaship.com/tr/sss/
    https://prepaship.com/tr/iletisim/

    After reviewing the error logs, it seems that the issue originates from the OpenGraph function of the Rank Math plugin. When the plugin is disabled and the cache is cleared, the issue is resolved. Can you help with this?

    Error logs are as follows:

    [06-Jan-2025 14:24:58 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * float in /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/media.php:467
    Stack trace:
    #0 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/media.php(135): wp_constrain_dimensions()
    #1 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/media.php(268): image_constrain_size_for_editor()
    #2 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/media.php(970): image_downsize()
    #3 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(703): wp_get_attachment_image_src()
    #4 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(651): RankMath\OpenGraph\Image->get_attachment_image()
    #5 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(684): RankMath\OpenGraph\Image->get_variations()
    #6 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(183): RankMath\OpenGraph\Image->get_image_variations()
    #7 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(410): RankMath\OpenGraph\Image->add_image_by_id()
    #8 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(391): RankMath\OpenGraph\Image->set_image_post_meta()
    #9 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(473): RankMath\OpenGraph\Image->set_user_defined_image()
    #10 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(317): RankMath\OpenGraph\Image->set_singular_image()
    #11 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(81): RankMath\OpenGraph\Image->set_images()
    #12 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php(266): RankMath\OpenGraph\Image->__construct()
    #13 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/class-wp-hook.php(324): RankMath\OpenGraph\Facebook->image()
    #14 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #15 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/plugin.php(565): WP_Hook->do_action()
    #16 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(90): do_action_ref_array()
    #17 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php(74): RankMath\OpenGraph\OpenGraph->do_action()
    #18 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/class-wp-hook.php(324): RankMath\OpenGraph\OpenGraph->output_tags()
    #19 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #20 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/plugin.php(565): WP_Hook->do_action()
    #21 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(90): do_action_ref_array()
    #22 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(180): RankMath\Frontend\Head->do_action()
    #23 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/class-wp-hook.php(324): RankMath\Frontend\Head->head()
    #24 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #25 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/plugin.php(517): WP_Hook->do_action()
    #26 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/general-template.php(3064): do_action()
    #27 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/themes/betheme/header.php(21): wp_head()
    #28 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/template.php(810): require_once(‘/home/u93841274…’)
    #29 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/template.php(745): load_template()
    #30 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/general-template.php(48): locate_template()
    #31 /home/u938412747/domains/prepaship.com/public_html/tr/wp-content/themes/betheme/page.php(10): get_header()
    #32 /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/template-loader.php(106): include(‘/home/u93841274…’)
    #33 /home/u938412747/domains/prepaship.com/public_html/tr/wp-blog-header.php(19): require_once(‘/home/u93841274…’)
    #34 /home/u938412747/domains/prepaship.com/public_html/tr/index.php(17): require(‘/home/u93841274…’)
    #35 {main}
    thrown in /home/u938412747/domains/prepaship.com/public_html/tr/wp-includes/media.php on line 467

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    You have used SVG images as the opengraph image on those pages. SVG images do not have dimensions so it triggers the error when the wp_constrain_dimensions function is called.

    We changed the image for https://prepaship.com/tr/hakkimizda/ to prepaship-icon.png and the page loads without error.

    According to the official OpenGraph documentation, the only supported MIME types are JPEG, PNG, and GIF.
    https://developers.facebook.com/docs/sharing/webmasters/#images

    Please remove the SVG images and use supported types.

    Let us know how it goes. Looking forward to helping you.

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

The ticket ‘Rank Math OpenGraph Problem’ is closed to new replies.