I'm getting this error on the back-end and have no idea how to solve it. I re-uploaded the APP directory already once to no avail. Any input on how to resolve this would be greatly appreciated.

[error] [exception.Craft\HttpException.400] exception 'Craft\HttpException' with message 'POST param “code” doesn’t exist.' in /path to craft/craft/app/services/HttpRequestService.php:509
Stack trace:
/path to craft/craft/app/controllers/UsersController.php(333): Craft\HttpRequestService->getRequiredPost('code')
/path to craft/craft/app/framework/web/actions/CInlineAction.php(49): Craft\UsersController->actionSetPassword()
  • You get this when a user is trying to set their password? – Brad Bell Nov 18 '16 at 18:23
  • @Brad Bell The specific time i get it that i noticed the error occurs is when doing something in the Charge plugin that requires an admin to confirm their password before it does it. – Christopher Healey Nov 19 '16 at 1:21
  • @ChristopherHealey did you manage to work out how to fix this problem? I'm also running into the same error when attempting to 'End Subscription' on a Charge subscription. – Brendan Underwood Jun 29 '17 at 0:56

We tried a lot of things to fix this but could not as yet. We tried Nginx config chnages, and on a different server htaccess setting changes, having settings in the config like enableCsrfProtection off, usePathInfo' => true etc. The requireElevatedSession works ok for us on change a users password etc so this did not seem to be the problem as some other users have had.

The only way we could get around this for now was by editing the Charge plugin to stop the requireElevatedSession (Asks for a password before doing anything). I hope everything is ok with Joel at SquareBit as his support before on this plugin was excellent, but have had no reply from the last few months.

We changed: 'craft/plugins/charge/controllers/Charge_ChargesController.php' lines 113 and 175 and Comment out/remove


And then in 'craft/plugins/charge/templates/payment/_view.html' removed JS calls

//new Craft.ElevatedSessionForm('.charge-refund-action');
//new Craft.ElevatedSessionForm('.charge-recur-cancel-action');

Hope this helps, or if anyone knows of a better fix?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.