We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I had pagination working fine in my app using:
But now, after upgrading to:
It's failing with:
[error] #PID<0.4760.0> running MyApp.Endpoint terminated Server: localhost:4000 (http) Request: GET /s ** (exit) an exception was raised: ** (Protocol.UndefinedError) protocol Scrivener.Paginater not implemented for #Ecto.Query<from s in MyApp.Sitemap, where: s.user_id == ^1, order_by: [desc: s.inserted_at]> lib/scrivener/paginater.ex:1: Scrivener.Paginater.impl_for!/1 lib/scrivener/paginater.ex:10: Scrivener.Paginater.paginate/2 (MyApp) web/controllers/sitemap_controller.ex:28: MyApp.SitemapController.index/2 (MyApp) web/controllers/sitemap_controller.ex:1: MyApp.SitemapController.action/2 (MyApp) web/controllers/sitemap_controller.ex:1: MyApp.SitemapController.phoenix_controller_pipeline/2 (MyApp) lib/MyApp/endpoint.ex:1: MyApp.Endpoint.instrument/4 (MyApp) lib/phoenix/router.ex:261: MyApp.Router.dispatch/2 (MyApp) web/router.ex:1: MyApp.Router.do_call/2 (MyApp) lib/MyApp/endpoint.ex:1: MyApp.Endpoint.phoenix_pipeline/1 (MyApp) lib/plug/debugger.ex:93: MyApp.Endpoint."call (overridable 3)"/2 (MyApp) lib/MyApp/endpoint.ex:1: MyApp.Endpoint.call/2 (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4 (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
I've already cleaned up and reinstalled the deps, not sure what is failing here. This is the code in the controller:
def index(conn, params) do sitemaps = Sitemap |> where(user_id: ^(current_user(conn).id)) |> order_by(desc: :inserted_at) |> Repo.paginate(params) render(conn, "index.html", sitemaps: sitemaps) end
Any idea? Thanks!
The text was updated successfully, but these errors were encountered:
This is failing in the controller when attempting to paginate. Perhaps you meant to submit this issue to scrivener?
Sorry, something went wrong.
Sure, I'll move this issue to scrivener. Thanks!
No branches or pull requests
Hello, I had pagination working fine in my app using:
But now, after upgrading to:
It's failing with:
I've already cleaned up and reinstalled the deps, not sure what is failing here. This is the code in the controller:
Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: