Skip to content

Commit

Permalink
Merge branch 'release/4.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Jan 21, 2024
2 parents cdc4fe7 + 4ab7250 commit b977a4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 4.0.2 - 2024-01-21
### Fixed
- Fixed getting schema data for multi-site setups

## 4.0.1 - 2024-01-21
### Fixed
- Fixed on issue on the schema settings screen, when no settings had been defined yet


## 4.0.0 - 2024-01-20
### Added
- JSON-LD Schema.org markup
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "studioespresso/craft-seo-fields",
"description": "Fields for your SEO & OG meta data",
"type": "craft-plugin",
"version": "4.0.1",
"version": "4.0.2",
"keywords": [
"craft",
"cms",
Expand Down
5 changes: 4 additions & 1 deletion src/models/SeoFieldModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ public function getSchema(Element $element = null)

try {
$schema = null;
$settings = $this->siteDefault->getSchema();
$primarySite = Craft::$app->getSites()->getPrimarySite();
$defaults = SeoFields::getInstance()->defaultsService->getDataBySite($primarySite);
$settings = $defaults->getSchema();

switch (get_class($element)) {
case Entry::class:
$schemaSettings = $settings['sections'];
Expand Down

0 comments on commit b977a4e

Please sign in to comment.