mikl
February 14, 2023, 10:08pm
1
In my router, I have a live "/archive", ArchiveLive.FileIndex, :index
(inside a live_session, if that matters)
But when the compiler tries to handle the sigil_r route ~p"/archive?#{url_params}"
, I get this compiler warning:
warning: no route path for MarsvinWeb.Router matches "/archive?#{url_params}"
Do I need to add something to the route to make it clear that it accepts URL parameters, or what’s going on here?
@mikl If you do mix phx.routes |grep archive
what do you get?
mikl
February 14, 2023, 10:15pm
3
Full output:
% mix phx.routes | grep archive
warning: no route path for MarsvinWeb.Router matches "/archive?#{url_params}"
lib/marsvin_web/live/archive_live/file_index.ex:123: MarsvinWeb.ArchiveLive.FileIndex.handle_event/3
GET /archive/file/:id/download MarsvinWeb.ArchiveController :download_file
GET /archive MarsvinWeb.ArchiveLive.FileIndex :index_pointing_at_the_viewer:
Looks fairly normal?
mikl
February 14, 2023, 10:39pm
4
The problem appeared after we upgraded to phoenix_live_view 0.18.13 and phoenix_html 3.3.0. If we go back to 0.18.11 and 3.2.0 the warnings disappear. Weird.
mikl
February 14, 2023, 10:41pm
5
1 Like