Closed chemicalkosek closed 4 months ago
Hi, I have problem with pricing ordering too.
variants.prices.amount
when "tags" query is applied.I ll have a look guys
once the snapshot is generated you can try this version https://github.com/medusajs/medusa/pull/5990
@chemicalkosek would you be able to test the snapshot version?
I've made this issue for some Discord users who had such problems, I wasn't actually using this. But sure, I'll test it today and get back to you.
PS. I thought that this will be the "new" way of ordering and filtering products: https://github.com/medusajs/medusa/pull/5447
yes you are right, but it has been put on pause for now .. So we still need to fix the existing :D
I have tested and can confirm that the original issue is fixed.
Altough there are some errors when starting the backend, I assume they come from some incoming breaking changes that are already merged in this snapshot.
Error: Cannot find module 'node_modules/@medusajs/admin/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:438:19)
[discovery] ORM entity discovery started, using ReflectMetadataProvider
Could not resolve module: cartCartSalesChannelSalesChannelLink. Error: Loaders for module cartCartSalesChannelSalesChannelLink failed: Cannot read properties of undefined (reading 'className')
Error initializing link modules. TypeError: Cannot set properties of undefined (setting '__definition')
at MedusaModule.bootstrapLink (/node_modules/@medusajs/medusa/node_modules/@medusajs/modules-sdk/dist/medusa-module.js:214:44)
Yes exactly, those errors are due to unreleased things yet. Thank you very much 👌
@olivermrbl should we proceed?
Yessir 🚢
Hey, thanks for the report! Since v2 brought a lot of architectural and API changes on the backend, we will be closing this ticket since it no longer applies to our new setup, or the issue has already been fixed. If you are still facing issues with v1, please open a new ticket and we will address it as soon as possible. Thanks! 🙏
Bug report
Describe the bug
When using
/store/products
route and ordering byvariants.prices.amount
not all products are retrieved even though thecount
in response is correct. The number of returned products also differs when changing from ASC to DESC.System information
Medusa version (including plugins): Node.js version: 1.7.3
Steps to reproduce the behavior
/store/products?fields=id&expand=variants.prices&order=variants.prices.amount
In test case the
count
in response is correct: 94. Actual records returned: 55When we reverse the order to DESC:
/store/products?fields=id&expand=variants.prices&order=-variants.prices.amount
In test case
count
in response is correct: 94. Actual records returned: 27The actual records returned is always the same. If we start to increase the
limit
to a number higher than the number of products in database it starts to return more products. It needed alimit
of almost 300 to return all 94 records.Products have different length of variants, some 1, some ~ 50.
Expected behavior
Return all relevant products