clickstorm / cs_seo

[clickstorm] SEO
Other
33 stars 49 forks source link

Not existing og_image overrides defaultImage #180

Closed poomer1988 closed 6 years ago

poomer1988 commented 6 years ago

Hi,

i noted that the 'defaultImage' will not rendered if the (fallback) og_image doesn't exist.

This line should be fixed:

from ` $ogImageURL = $pluginSettings['social.']['defaultImage'];

    if ($meta['og_image']) {
        $ogImageURL = $this->getImageOrFallback('og_image', $meta);
    }

`

to ` $ogImageURL = $pluginSettings['social.']['defaultImage'];

    if ($meta['og_image']) {
        $ogImage = $this->getImageOrFallback('og_image', $meta);
        if ($ogImage) {
            $ogImageURL = $ogImage;
        }
    }

`

clickstorm commented 6 years ago

Thanks for the hint. I fixed it in dev and branch 2x.