Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
316 stars 157 forks source link

[Rails][Administrate] Pagination does not work #658

Closed MohamedAsan closed 2 years ago

MohamedAsan commented 2 years ago

Describe the bug Unable to view the pages other than the first page in Speakers, Stories, Places & Users list page

To Reproduce Steps to reproduce the behavior:

  1. Go to any of the list page with more than 50 entities - Speakers/Stories/Places/Users
  2. Scroll down to the bottom
  3. Click on "Next ›"

Expected behavior User should be navigated to 2nd page and corresponding entities must be displayed

Actual behavior User remains in the first page itself and same entities are displayed

Screenshots

Terrastories - Pagination Issue

Additional context The following error is displayed in the logs

Unpermitted parameters: :locale, :page

Root Cause: https://github.com/thoughtbot/administrate/issues/1957 https://github.com/thoughtbot/administrate/pull/1725

Proposed Fix: Specify the param_name in paginate method


<%= paginate resources, param_name: '_page' %>
MohamedAsan commented 2 years ago

@rudokemper I would like to fix this issue along with #648 as it is blocking its testing