Closed sunscreem closed 5 months ago
Hey @sunscreem, which version of Craft and Commerce are you running?
Seems like a problem with the query and possibly with Commerce - not with Scout.
I tried this with a fresh Commerce install and on my end the ->hasVariant(['hasStock' => true])
doesn't throw any errors. (on the latest Craft 4 & matching Commerce version).
Hey @janhenckens I just did a clean install of Craft 5, Craft Commerce and Scout, copied over my scout.php
and got the same error.
So it's either a commerce issue or my scout config. So - I agree - I'm going to close this. I'll keep looking into it.
Hey @janhenckens Yup - not a scout issue.
Thanks again.
I'm not sure if this is a scout or a commerce issue - but I'll start here incase I'm doing something dumb:
my criteria in
scout.php
:When I go to Utilities > Scout Indexes:
Workaround
If I remove
->hasVariant(['hasStock' => true])
from my query that error goes away, but non-stock items are going to be indexed.Stack Trace