Phantom 302 status code when sending a POST requests on pages

This question is pretty old but the only one that popped out for this kind of problem. I had it this night, spend almost 4 hours hitting myself against the wall – disabling plugins, commenting code here and there (and this is a large multisite project with lots of custom functionality and frontend forms, custom urls and templates etc.). That was a pain…

I will just leave it here. Maybe it will save someone couple of hours.

When building custom frontend forms, always prepend your
input/select/etc names with your custom prefix
.”

When you forget about this and start naming fields to fit your global naming convention, you can create a select which shows your custom taxonomy and name it the same as a custom taxonomy is named itself. When you hit “Submit”, WordPress receives your $_POST data, parses it, “understands” this name as its registered $query_var and transforms the request, adding this $query_var. Of course it results in a redirect, clearing your $_POST data and preventing form from doing what it supposed to do.