Closed jcelliott closed 1 year ago
Make sure you have Plug.Parsers
running before Plug.MethodOverride
The override will not work without the parsed body available
@a3kov thank you for the suggestion! That was indeed the issue. We have a complicated Plug.Parsers
configuration due to some proxy requests we're handling, but the net result was the _method
parameter wasn't getting parsed before Plug.MethodOverride
was called.
Versions Used Kaffy: 0.9.4 Phoenix: 1.6.16 Elixir: 1.14.2
What's actually happening?
When I click "Save" to update a record I'm getting a 404 error. Looking at the network logs, it's trying to make a POST request to
/:context/:resource/:id
instead of a PUT request. I've tested on Firefox and Chrome to make sure it wasn't a browser issue.What should happen instead?
The record should be saved correctly. The frontend should be making a PUT request.
I see the router configuration here and the form configuration here, which both look correct to me. If anyone has pointers for somewhere else I should look please let me know.