From de88aecd445c8bff854211effdebbe4ef588ef53 Mon Sep 17 00:00:00 2001 From: Jan Henckens Date: Fri, 22 Sep 2023 12:06:38 +0200 Subject: [PATCH] Fixes for 3.2.1 --- CHANGELOG.md | 5 +++++ composer.json | 2 +- src/ScoutIndex.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63de9c9..8a8d273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 3.2.1 - 2023-09-22 +### Fixed +- This fixes an issue where we default to the primary site when no site id is supplied through index settings. + + ## 3.2.0 - 2023-09-16 ### Added - This release adds lazy loading of the index's criteria function, to try and migigate "behaviour not found" errors ([#268](https://github.com/studioespresso/craft-scout/pull/268)) diff --git a/composer.json b/composer.json index cd017eb..090696e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "studioespresso/craft-scout", "description": "Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries.", "type": "craft-plugin", - "version": "3.2.0", + "version": "3.2.1", "keywords": [ "craft", "cms", diff --git a/src/ScoutIndex.php b/src/ScoutIndex.php index 974ad15..8fdbf38 100644 --- a/src/ScoutIndex.php +++ b/src/ScoutIndex.php @@ -84,7 +84,7 @@ public function getCriteria(): ElementQuery } if (is_null($elementQuery->siteId)) { - $elementQuery->siteId = Craft::$app->getSites()->getPrimarySite()->id; + $elementQuery->siteId = "*"; } $this->_criteria = $elementQuery;