No route matches [POST] error when importing CSV data
hschin opened this issue · 6 comments
When importing CSV data, after parsing the import, clicking on the 'Save and continue' button or the 'Import Data Now!' button results in a No route matches [POST] "/admin/imports/1"
error.
I can see the matching route when I run rake:routes
though:
administration_import GET /admin/imports/:id(.:format) administration/imports#show
PATCH /admin/imports/:id(.:format) administration/imports#update
PUT /admin/imports/:id(.:format) administration/imports#update
DELETE /admin/imports/:id(.:format) administration/imports#destroy
That's weird! I just tested and it seems to work for me... what browser are you using?
There is no route for POST /admin/imports/1
(but there are routes for PUT /admin/imports/1
and POST /admin/imports
), so it seems the browser isn't sending the special _method
argument perhaps?
I've tried on both Chrome and Firefox. I even spun up a fresh DO droplet with the DO installer and I still got an error. I can see the _method
argument being passed in the form data of the POST request so that shouldn't be a problem. I'm really puzzled by this, and now hearing that it works for you, it's even stranger.
@hschin are there any JavaScript errors in the Web Developer console during or after you click the button?
@hschin can you also try using another computer or perhaps a smart phone? I'm wondering if there is maybe some aggressive firewall running on your computer stripping out the needed parameter (a little far-fetched, but worth a shot).
@seven1m no javascript errors and still the same error when trying on my iPad on cellular. do you think it could be due to a problem with the file i'm importing? that's the only other difference that i can think of.
I've not seen this since this report and have not been able to reproduce. I'm going to say it's something to do with the network or browser or specific issue with the version of OneBody in use here. If you can reproduce on current master, please let me know!