From a347bafa874f4a9274f60cf9568526000bee4587 Mon Sep 17 00:00:00 2001 From: munirajun Date: Fri, 9 Feb 2018 12:07:21 +0530 Subject: [PATCH] Fix canonical url and image issue --- src/Quintype/Seo/Story.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Quintype/Seo/Story.php b/src/Quintype/Seo/Story.php index b2f7d4c..cc36f93 100644 --- a/src/Quintype/Seo/Story.php +++ b/src/Quintype/Seo/Story.php @@ -112,7 +112,7 @@ private function getCardShareOgAttributes() $attributes = [ 'title' => isset($this->cardSocialShare["title"])? $this->cardSocialShare["title"] : trim($this->getTitle()), 'type' => 'article', - 'url' => "{$this->config['sketches-host']}/{$this->story['slug']}/{$card['id']}", + 'url' => $this->getCanonicalUrl(). "/". $this->card['id'], 'site-name' => trim($this->config['title']), 'description' => isset($this->cardSocialShare["message"])? $this->cardSocialShare["message"] : trim($this->getSocialDescription()), 'image' => isset($this->cardSocialShare["image"])? $this->getCardImageUrl() : $this->getHeroImageUrl(), @@ -216,7 +216,7 @@ private function getHeroImageUrl() private function getCardImageUrl() { - return $this->getImageCDNUrl($this->card['metadata']['image']['key']); + return $this->getImageCDNUrl($this->cardSocialShare['image']['key']); } private function getImageCDNUrl($imageS3Key)