mplodowski / seomanager-plugin-public

https://octobercms.com/plugin/renatio-seomanager
https://octobercms.com/plugin/renatio-seomanager
4 stars 1 forks source link

Config definition for media path has changed in October #16

Closed nizzac closed 3 years ago

nizzac commented 3 years ago

The SeoTags component attempts the get og image dimensions in the setOgImageDimensions() method.

It attempts to get the path for the media directory using

config('cms.storage.media.path')

but this has since been changed in OctoberCMS v2 to

config('system.storage.media.path')

This causes the og_image_width and og_image_height properties not to be set so throws an error on the frontend when an seo image is added.

daftspunk commented 3 years ago

To fix support for v2 (and keep support for v1).

  1. Open plugins\renatio\seomanager\components\SeoTags.php
  2. In method setOgImageDimensions
  3. Update $filePath variable set to:
    $filePath = base_path(config('system.storage.media.path', config('cms.storage.media.path')).$this->seoTag->og_image);
mplodowski commented 3 years ago

Thank you for this. Fixed in version 1.3.4.