Closed npflood closed 2 years ago
This fixes an issue with a currently released version of Spree. Can someone review the changes and either merge this branch or indicate that the underlying issue has been resolved in another way?
is this going to be accept?
I can also confirm this bug and the fix works, should be merged...
Fixes #90
Navigating to a taxon view in spree_frontend (any URL like /t/taxon_name) where products should be returned raised PG::GroupingError: ERROR: column "spree_product_translations.id" must appear in the GROUP BY clause or be used in an aggregate function
Removing the .includes(:translations).references(:translations) from the spree_base_scopes method in SpreeGlobalize::Translatable allows the query to succeed, but causes n+1 queries.
Adding .with_translations to the spree_base_scopes method in SpreeGlobalize::Translatable allows the query to succeed, without n+1 queries.