<p>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.</p>

<p>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.</p>

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

<pre><code>//$this-&gt;requireElevatedSession();
</code></pre>

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

<pre><code>//new Craft.ElevatedSessionForm('.charge-refund-action');
//new Craft.ElevatedSessionForm('.charge-recur-cancel-action');
</code></pre>

<p>Hope this helps, or if anyone knows of a better fix?</p>

CC BY-SA 3.0
2017-08-16T05:56:32.953Z
2017-08-16T05:56:32.953Z
Green17
<p>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.</p>

<pre><code>[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-&gt;getRequiredPost('code')
/path to craft/craft/app/framework/web/actions/CInlineAction.php(49): Craft\UsersController-&gt;actionSetPassword()
</code></pre>

CC BY-SA 3.0
2016-11-18T18:23:47.703Z
You get this when a user is trying to set their password?
Brad Bell
CC BY-SA 3.0
2016-11-19T01:21:07.077Z
@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
CC BY-SA 3.0
2017-06-29T00:56:28.910Z
@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
<error-message><error><plugin-charge>
POST param "code" doesn't exist
# POST param "code" doesn't exist

(Asked by: username_0 on 2016-11-18)

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()

**Tags:** error-message, error, plugin-charge

> **Comments:**
> **username_1**: You get this when a user is trying to set their password?  
> **username_0**: @username_1 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.  
> **username_2**: @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.  

---

## 1 answers

### Answer by username_3 on 2017-08-16. Score: 1

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 
//$this->requireElevatedSession();

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?


---

