-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting based on edits / page views / likes shows only 1 row on the first page of wikis #9290
Comments
Hey @Manasa2850, I have just started out contributing to open source and already contributed to a first-timers issue. I want to try out this issue. |
Although I checked this in my local development and this bug is not happening. |
Hi @gaurav2699 sure you can work on it. |
Hi, this is a good catch, but I wonder how we can find this bug in more detail. I wonder - should we try writing a functional test for it, by building on these tests? plots2/test/functional/wiki_controller_test.rb Lines 20 to 32 in c9349ca
Could we try to open a PR that "catches" the bug by counting the # of results on each page? Thank you for your help!!! |
@jywarren I'm not able to make a PR to catch that bug since I don't see it locally. I observed it on https://publiclab.org/wiki. It would be great if someone who's observing this locally too, could make the PR. |
@jywarren any reason why this bug is not replicated locally? |
This is really weird..I think it has smth to do with pagination -- the no. of elements per page not being clearly defined, on the website I have noticed when you sort with title the number per page reduces to 8, if you go to page 2 its 3 etc the number per page keeps shifting...locally I cannot replicate too but also it doesn't paginate for me...I created upto 20 wikis and they are all showing on the first page |
Hey, @cesswairimu @jywarren I made a PR for this which should fix this issue. Basically, I specified the number of items on every page to be 10. Now, it paginates in local development too and this bug is not happening. Please review |
The changes will appear on https://stable.publiclab.org/ in 15 min or so...lets confirm there this is all fixed. Thanks everyone ❤️ |
Looks like the issue is not fixed yet 🙃 https://stable.publiclab.org/wiki?sort=page_views reopening this |
This is really weird, as it was working with no issues in my local development. Maybe pagination was not the problem, or maybe we are missing something. |
yeah pagination now works fine on my local too...I agree we may be missing smth |
@cesswairimu another thing I observed is that the same entry appears in multiple rows. For example, |
oh wow, great observation...maybe we need to add "distinct" on the query fetching on index 🤔 ...I will investigate more on this and revert |
Please describe the problem (or idea)
When we sort wikis based on
title
orlast edited
, it works fine and shows the same number of rows on the first page before and after sorting.However, if we sort based on
edits
,pages views
orlikes
, it shows only one row on the first page.Please show us where to look
https://publiclab.org/wiki
The text was updated successfully, but these errors were encountered: