rtCamp / rtMedia

rtMedia (formerly Buddypress Media) adds advanced multimedia functionality to WordPress, BuddyPress and bbPress
https://rtmedia.io/
121 stars 110 forks source link

rtMedia Sorting: sorting based on Most rated is not working as expected #2051

Open maharrshi opened 3 months ago

maharrshi commented 3 months ago

Describe the bug When the media gallery is sorted based on "Most Rated", there is no difference in the results produced. It is the same result irrespective of the sorting applied

To Reproduce Steps to reproduce the behavior:

  1. Go to Home page and add a block: shortcode
  2. Type in "[rtmedia_gallery global="true" sort_parameters="new,comment,rate,view,like"]" and save .
  3. Provide 5 star rating for one image and 1 star rating for another different image
  4. Now sort the media gallery with "Most Rated"

Expected behavior Picture with 5 star rating should be displayed first .

Actual behavior Irrespective of the sorting, the image with least rating is displayed first

Visual Proof

https://github.com/rtCamp/rtMedia/assets/110522049/f856f54d-d6a6-4a7c-8398-5b374a5ac322

Test Environment Used

Additional Note: Similarly Sorting the media by title is also not working as expected where the expected behavior is that the image with title as "aaaa" has to be displayed first but the behavior of the sort does not work and same sorting is shown always. Visual Proof for the additional Note:

https://github.com/rtCamp/rtMedia/assets/110522049/26a0a6cc-ebb1-4517-9bda-9bcdfe4ec6b7