strapi / strapi

🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
https://strapi.io
Other
61.51k stars 7.7k forks source link

Strapi update from 4.8.2 to 4.25 loses date sorting #20533

Open majkl-zumberi opened 1 week ago

majkl-zumberi commented 1 week ago

Bug report

Required System information

Describe the bug

hi i migrated my strapi project from 4.8.2 to the latest stable version 4.25 i noticed my frontend breaks because of a failing fetch over the backend api localhost:1337/api/products?locale=it-IT&populate=deep%2C4&sort=date%3Adesc&pagination%5Blimit%5D=-1

the error i receive from strapi is the following {“data”:null,“error”:{“status”:400,“name”:“ValidationError”,“message”:“Invalid parameter date”,“details”:{}}}

how can i sort based on the date in strapi@4.25?

Steps to reproduce the behavior

  1. Go to 'localhost:1337/api' and try to sort any collection with date:desc
  2. See error "Invalid parameter date"

Expected behavior

to sort collection with date as it was working without any issues like in strapi@4.8.2

delapasionm commented 1 week ago

we're also experiencing the same issue with the new strapi version about sort date by desc