You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I get the following error when saving an entry:
PHP Warning – [yii\base\ErrorException](https://www.yiiframework.com/doc-2.0/yii-base-errorexception.html)
Undefined array key 0
In .../vendor/studioespresso/craft-scout/src/behaviors/SearchableBehavior.php
Line 88 && ($criteriaSiteIds[0] === '*' || in_array((int)$this->owner->siteId, $sit
If I add criteria to the Replica Indexes config, the error goes away. I'm using $query->id(0) to ensure an empty Element Query, but would prefer not to have any criteria at all.
janhenckens
changed the title
Undefined array key error in SearchableBehavior.php when replicaIndex is true
[STU-167] Undefined array key error in SearchableBehavior.php when replicaIndex is true
Jul 15, 2024
I am running Scout 4.1.0 on Craft 4.9.7 and configuring a Replica Index.
My
/config/scout.php
file looks like this:Based off this merged PR and the documentation, I expected the Replica Indexes to not require criteria, like this example:
However, I get the following error when saving an entry:
If I add criteria to the Replica Indexes config, the error goes away. I'm using
$query->id(0)
to ensure an empty Element Query, but would prefer not to have any criteria at all.Am I misunderstanding the documentation for Replica Indexes or is this a bug perhaps?
STU-167
The text was updated successfully, but these errors were encountered: