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

[3.x]: Product query by type returns all products if type doesn't exist #2966

Closed
jamiematrix opened this issue Sep 8, 2022 · 1 comment
Closed
Assignees
Labels
bug commerce3 Issues related to Commerce v3

Comments

@jamiematrix
Copy link

What happened?

Description

Trying to use query params to filter down a product query. If the type used in the query param doesn't exist as a product type then the product query returns all products

Steps to reproduce

  1. Create product query
  2. Set the query to look for a product type that doesn't exist
  3. Results return all products

Expected behavior

Would hope/think that querying for products under a type that doesn't exist would return 0 products

Actual behavior

Returns all products

Craft CMS version

3.7.52

Craft Commerce version

3.4.16

PHP version

7.4

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@jamiematrix jamiematrix added commerce3 Issues related to Commerce v3 bug labels Sep 8, 2022
@nfourtythree nfourtythree self-assigned this Sep 20, 2022
@nfourtythree
Copy link
Contributor

Hi @jamiematrix

Thank you for bringing this to our attention. We have just pushed a fix which will be included in the next release of Commerce 3.x.

To get this early, change your craftcms/commerce requirement in your project's composer.json to:

"require": {
  "craftcms/commerce": "v3.x-dev#8fa5c6ec15d81b75424ebde044ecf663dab20fc1 as 3.4.17.2",
  "...": "..."
}

Then run composer update.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce3 Issues related to Commerce v3
Projects
None yet
Development

No branches or pull requests

2 participants