Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using "*" in element criteria makes utility panel fail #163

Closed
ockam opened this issue Jun 17, 2020 · 2 comments
Closed

Using "*" in element criteria makes utility panel fail #163

ockam opened this issue Jun 17, 2020 · 2 comments
Labels
⚙️ CP Control Panel/Administration related

Comments

@ockam
Copy link

ockam commented Jun 17, 2020

FWIW - you can query * or an array on sites now in Craft, so if you didn't need them in different algolia indices, you could do this in one criteria.

Originally posted by @timkelty in #95 (comment)

@ockam ockam closed this as completed Jun 17, 2020
@ockam ockam changed the title FWIW - you can query * or an array on sites now in Craft, so if you didn't need them in different algolia indices, you could do this in one criteria. Using * in element criteria makes utility panel fail Jun 17, 2020
@ockam ockam changed the title Using * in element criteria makes utility panel fail Using "*" in element criteria makes utility panel fail Jun 17, 2020
@ockam
Copy link
Author

ockam commented Jun 17, 2020

As suggested by @timkelty, you can use * to query multiple sites and aggregate them in a single indice.

It works fine, except for the Utility panel, which expect a single siteId:

Argument 1 passed to craft\services\Sites::getSiteById() must be of the type int, string given, called in /vendor/rias/craft-scout/src/utilities/ScoutUtility.php on line 37

Could you add a check for * or is_array and set the site to "Multiple sites" or a list of the sites?

@ockam ockam reopened this Jun 17, 2020
@janhenckens janhenckens added the ⚙️ CP Control Panel/Administration related label Aug 3, 2021
@janhenckens janhenckens added this to the 2.4.1 milestone Aug 13, 2021
janhenckens added a commit that referenced this issue Aug 13, 2021
@janhenckens
Copy link
Member

This was fixed in today's release!

davist11 pushed a commit to vigetlabs/craft-scout that referenced this issue Oct 1, 2021
davist11 pushed a commit to vigetlabs/craft-scout that referenced this issue Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ CP Control Panel/Administration related
Projects
None yet
Development

No branches or pull requests

2 participants