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
When looking at a shop, customer have the ability to filter products by product category, supplier property or product property using the the "tag" under "filter by" on the left hand side of the page.
In the specific scenario where a supplier as set a custom sorting by category, filtering by supplier property doesn't work. When clicking on a supplier property, the "tag" will be selected, but the filtering won't happen and the loading products spinner never disappear.
The bug can be reproduced here : https://staging.openfoodnetwork.org.au/noname-hub/shop when filtering by "Free Range"
This was introduced by the Product refactor
Expected Behavior
Only product inheriting "Free Range" supplier property should be displayed
Actual Behaviour
All product are shown, no filtering is happening and Loading products spinner doesn't disappear. There is a request returning a 422 error (see bugsnag below)
Steps to Reproduce
As a enterprise manager
Go to the shop setting, and select "shop preferences" on the left hand side menu
Set "Display ordering in shopfront" to "By category" and select one or more categories and save change
Now select "Properites" on the left hand side menu
Add a property
Go to the "Products" page and choose a product
Add a property to the product and tick "Inherit properties from ", and update
As a customer
Navigate to the shop page
2.Try to filter by the supplier property added above -> filtering doesn't work
Error in Coopcircuits
ActiveRecord::StatementInvalid in api/v0/order_cycles#products
PG::UndefinedColumn: ERROR: column first_variant.supplier_id does not exist
LINE 4: ...t.product_id JOIN enterprises ON enterprises.id = first_vari...
^
rioug
added
the
bug-s3
The bug is stopping a critical or non-critical feature but there is a usable workaround.
label
Jul 10, 2024
rioug
changed the title
ActiveRecord::StatementInvalid in api/v0/order_cycles#products
Filtering product by supplier property breaks when enterprise has custom sorting by category set
Jul 10, 2024
May I work on this issue ?
(Sorry for the multiple ping, but I guess some of you might enjoy well deserved holidays and I do not know which account I should ping).
Description
When looking at a shop, customer have the ability to filter products by product category, supplier property or product property using the the "tag" under "filter by" on the left hand side of the page.
In the specific scenario where a supplier as set a custom sorting by category, filtering by supplier property doesn't work. When clicking on a supplier property, the "tag" will be selected, but the filtering won't happen and the loading products spinner never disappear.
The bug can be reproduced here : https://staging.openfoodnetwork.org.au/noname-hub/shop when filtering by "Free Range"
This was introduced by the Product refactor
Expected Behavior
Only product inheriting "Free Range" supplier property should be displayed
Actual Behaviour
All product are shown, no filtering is happening and Loading products spinner doesn't disappear. There is a request returning a 422 error (see bugsnag below)
Steps to Reproduce
As a enterprise manager
As a customer
2.Try to filter by the supplier property added above -> filtering doesn't work
Error in Coopcircuits
ActiveRecord::StatementInvalid in api/v0/order_cycles#products
PG::UndefinedColumn: ERROR: column first_variant.supplier_id does not exist
LINE 4: ...t.product_id JOIN enterprises ON enterprises.id = first_vari...
^
View on Bugsnag
Another one on AU prod:
https://app.bugsnag.com/yaycode/openfoodnetwork-aus/errors/668cc120963f0b000858abbf?event_id=668dd06e00efe4c55a620000&i=sk&m=nw
Stacktrace
View full stacktrace
Created by Coopcircuits Admin via Bugsnag
Workaround
Can still browse product it just less convenient to not be able to filter.
Severity
bug-s3: a feature is broken but there is a workaround
The text was updated successfully, but these errors were encountered: