Describe the bug
When ordering the proposals with the "recent" ordering, the order seems broken (see the screenshot or go to see the issue at Metadecidim).
There are two separate issues regarding this that are most likely technically related:
- The order is incorrect, e.g. proposals from February and November 2019 comes 4th, 5th and 6th in the results and after them the next result seems correct (February 2021)
- The result listing produces duplicate records (see the exclamation marks in the attached screenshot)
There is also lots of other issues related to this. Basically there are collisions with the cache keys of the proposal cards (see comments below).
To Reproduce
Steps to reproduce the behavior:
- Go to https://meta.decidim.org/processes/roadmap/f/122/proposals?order=recent
- (Alternatively, go without the "order" parameter and change the order yourself from the dropdown)
- Wait for the page to load
- See incorrect ordering and possible duplicates in the results
Expected behavior
I would expect the proposals to come ordered by their created_at dates when I change proposal ordering to "Recent".
Screenshots

Stacktrace
No stacktrace, the issue is most likely with the filtering or the base query used to fetch the records.
EDIT: The issue is related to caching, see comments below.
Extra data (please complete the following information):
- Device: Laptop
- Device OS: Ubuntu 20.04
- Browser: Chrome
- Decidim Version: 0.24.0.rc1
- Decidim installation: MetaDecidim
Additional context
Possibly incorrect joins in the query causing the results to get the created_at date from some other record and causing the results to produce duplicates?
Did not dig deeper, just seen similar issues in the past caused by incorrect joins.
EDIT: The issue is related to caching, see comments below.
Describe the bug
When ordering the proposals with the "recent" ordering, the order seems broken (see the screenshot or go to see the issue at Metadecidim).
There are two separate issues regarding this that are most likely technically related:
There is also lots of other issues related to this. Basically there are collisions with the cache keys of the proposal cards (see comments below).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the proposals to come ordered by their
created_atdates when I change proposal ordering to "Recent".Screenshots

Stacktrace
No stacktrace,
the issue is most likely with the filtering or the base query used to fetch the records.EDIT: The issue is related to caching, see comments below.
Extra data (please complete the following information):
Additional context
Possibly incorrect joins in the query causing the results to get thecreated_atdate from some other record and causing the results to produce duplicates?Did not dig deeper, just seen similar issues in the past caused by incorrect joins.EDIT: The issue is related to caching, see comments below.