diff --git a/CHANGELOG_de-DE.md b/CHANGELOG_de-DE.md index a068543..31cdb7c 100644 --- a/CHANGELOG_de-DE.md +++ b/CHANGELOG_de-DE.md @@ -1,3 +1,6 @@ +# 4.1.4 +- Fehler bei Author für Meta-Daten behoben [9](https://github.com/Werkstattl/OpenBlogware/issues/9) + # 4.1.3 - Fehler bei gemischten Suchergebnissen behoben [12](https://github.com/Werkstattl/OpenBlogware/issues/12) diff --git a/CHANGELOG_en-GB.md b/CHANGELOG_en-GB.md index 6267b11..66c4880 100644 --- a/CHANGELOG_en-GB.md +++ b/CHANGELOG_en-GB.md @@ -1,3 +1,6 @@ +# 4.1.4 +- Fixed author for meta data [9](https://github.com/Werkstattl/OpenBlogware/issues/9) + # 4.1.3 - Fixed mixed search results [12](https://github.com/Werkstattl/OpenBlogware/issues/12) diff --git a/composer.json b/composer.json index 064c2e5..f655b2f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "werkstattl/openblogware", "description": "OpenBlogware: A Blog Module for Shopware 6.", - "version": "4.1.3", + "version": "4.1.4", "type": "shopware-platform-plugin", "keywords": ["blog", "news"], "license":"MIT", diff --git a/src/Page/Blog/BlogPageLoader.php b/src/Page/Blog/BlogPageLoader.php index 43e8a77..e7f2418 100644 --- a/src/Page/Blog/BlogPageLoader.php +++ b/src/Page/Blog/BlogPageLoader.php @@ -111,8 +111,8 @@ private function loadBlogEntry(string $articleId, SalesChannelContext $context): { $criteria = (new Criteria([$articleId])) ->addAssociation('author.salutation') - ->addAssociation('blogCategories'); - + ->addAssociation('blogCategories') + ->addAssociation('blogAuthor'); $this->eventDispatcher->dispatch(new BlogPageCriteriaEvent($articleId, $criteria, $context)); $blogEntry = $this->blogRepository diff --git a/src/Resources/views/storefront/layout/meta.html.twig b/src/Resources/views/storefront/layout/meta.html.twig index 1507ae7..2c0fec1 100644 --- a/src/Resources/views/storefront/layout/meta.html.twig +++ b/src/Resources/views/storefront/layout/meta.html.twig @@ -31,7 +31,7 @@ "description": "{{ entry.translated.teaser }}", "author": { "@type": "Person", - "name": "{{ entry.author.translated.name }}" + "name": "{{ entry.blogAuthor.firstName }} {{ entry.blogAuthor.lastName }}" }, {% if entry.media.thumbnails.elements|length %} "image":[{% for item in entry.media.thumbnails.elements %}"{{ item.url }}"{{ loop.last ? '' : ',' }}{% endfor %}],{% endif %}