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
I got a multisite craft cms 5 instance using graphql. I got an entry type, which i can assign one ore multiple categories to it. Those categories can be be disabled or enabled on each site individually. When filtering for an entry, which has a category disabled on another site, the response will be an empty array, even if there are clearly entries on this site with this category
I am implementing a frontend filter of entries, which sends a query somewhat like this on change of the filter:
query teamQuery($siteHandle: [String], $onlyFilters: Boolean!, $teamMemberIds: [QueryArgument]) {
entries(
site: $siteHandle
section: "team"
id: $teamMemberIds
relatedToCategories: {id: ["28235"]}
) @skip(if: $onlyFilters) {
id
title
... on team_Entry {
teamCategories {
id
title
}
}
}
}
Expected behavior
Show all filtered entries of the current site with the categories (enabled on the selected site).
Actual behavior
Show all entries of current site with the categories. but if the filtered category is disabled on another site, no entry is shown.
Craft CMS version
5.6.11
PHP version
8.3.17
Operating system and version
No response
Database type and version
mysql
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting! It looks like this will happen if the category is disabled for the primary site. I raised a PR for this.
If you need this to work straight away, you can modify the relatedToCategories part to use any site, like so: relatedToCategories: [{id: ["12345"], site: "*"}].
What happened?
Description
I got a multisite craft cms 5 instance using graphql. I got an entry type, which i can assign one ore multiple categories to it. Those categories can be be disabled or enabled on each site individually. When filtering for an entry, which has a category disabled on another site, the response will be an empty array, even if there are clearly entries on this site with this category
I am implementing a frontend filter of entries, which sends a query somewhat like this on change of the filter:
Expected behavior
Show all filtered entries of the current site with the categories (enabled on the selected site).
Actual behavior
Show all entries of current site with the categories. but if the filtered category is disabled on another site, no entry is shown.
Craft CMS version
5.6.11
PHP version
8.3.17
Operating system and version
No response
Database type and version
mysql
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: