Duplicates of og properties caused a lot of errors

Created on 22 January 2020, almost 5 years ago
Updated 18 February 2023, almost 2 years ago

If the page has duplicates of properties this caused a lot of errors on a page

Warning: strstr() expects parameter 1 to be string, array given in template_preprocess_opengraph_filter() (line 461 of /var/www/html/sites/all/modules/contrib/opengraph_filter/opengraph_filter.module).
Warning: explode() expects parameter 2 to be string, array given in template_preprocess_opengraph_filter() (line 462 of /var/www/html/sites/all/modules/contrib/opengraph_filter/opengraph_filter.module).
Notice: Array to string conversion in template_preprocess_opengraph_filter() (line 466 of /var/www/html/sites/all/modules/contrib/opengraph_filter/opengraph_filter.module).

Duplicates of 'og:image:width' and 'og:image:height' caused fatal error:

 Error: Unsupported operand types in theme_opengraph_filter_image() (line 350 of /var/www/html/sites/all/modules/contrib/opengraph_filter/opengraph_filter.module).
 

For reproducing this issue the page can contain the following:

    <meta name="description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
    <meta name="description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
    <meta property="og:title" content="Open Graph protocol">
    <meta property="og:title" content="Open Graph protocol">
    <meta property="og:type" content="website">
    <meta property="og:type" content="website">
    <meta property="og:url" content="http://ogp.me/">
    <meta property="og:url" content="http://ogp.me/">
    <meta property="og:image" content="http://ogp.me/logo.png">
    <meta property="og:image" content="http://ogp.me/logo.png">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:width" content="300">
    <meta property="og:image:width" content="300">
    <meta property="og:image:height" content="300">
    <meta property="og:image:height" content="300">
    <meta property="og:image:alt" content="The Open Graph logo">
    <meta property="og:image:alt" content="The Open Graph logo">
    <meta property="og:description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
    <meta property="og:description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
πŸ› Bug report
Status

Fixed

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine loon Lutsk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024