diff --git a/src/Model/Extension/SeoPageExtension.php b/src/Model/Extension/SeoPageExtension.php index f821dbf..2832428 100644 --- a/src/Model/Extension/SeoPageExtension.php +++ b/src/Model/Extension/SeoPageExtension.php @@ -213,10 +213,10 @@ public function updateCMSFields(FieldList $fields) Config::inst()->get('CyberDuck\SEO\SocialImage', 'min_file_width'), Config::inst()->get('CyberDuck\SEO\SocialImage', 'min_file_height'), Config::inst()->get('CyberDuck\SEO\SocialImage', 'max_file_size'), - Config::inst()->get('CyberDuck\SEO\SocialImage', 'file_aspect_ratio'), + Config::inst()->get('CyberDuck\SEO\SocialImage', 'file_aspect_ratio') )); $uploader->getValidator()->setAllowedMaxFileSize(['*' => (int)Config::inst()->get('CyberDuck\SEO\SocialImage', 'max_file_size') * 1024 * 1024]); - + if(class_exists(BlogPost::class)) { if($this->owner instanceof BlogPost) { if($this->owner->Parent()->UseFeaturedAsSocialImage == 1) { diff --git a/src/Model/Extension/SeoSiteConfigExtension.php b/src/Model/Extension/SeoSiteConfigExtension.php index 4d4742e..22e8a69 100644 --- a/src/Model/Extension/SeoSiteConfigExtension.php +++ b/src/Model/Extension/SeoSiteConfigExtension.php @@ -89,7 +89,7 @@ public function updateCMSFields(FieldList $fields) Config::inst()->get('CyberDuck\SEO\SocialImage', 'min_file_width'), Config::inst()->get('CyberDuck\SEO\SocialImage', 'min_file_height'), Config::inst()->get('CyberDuck\SEO\SocialImage', 'max_file_size'), - Config::inst()->get('CyberDuck\SEO\SocialImage', 'file_aspect_ratio'), + Config::inst()->get('CyberDuck\SEO\SocialImage', 'file_aspect_ratio') )); $uploader->getValidator()->setAllowedMaxFileSize(['*' => (int)Config::inst()->get('CyberDuck\SEO\SocialImage', 'max_file_size') * 1024 * 1024]); $fields->addFieldToTab('Root.SEO', $uploader);