I canβt believe that I solved the problem less than an hour after the discovery of generosity, but hey ho.
The problem was that Slim had no built-in ability to handle the header X-HTTP-Method-Overrideused by the backbone, and the error message was not very descriptive. By adding the following to the bottom of request.php and using emulateHTTP mode in Backbone, he fixed it
protected function checkForHttpMethodOverride() {
if ( isset($this->post[self::METHOD_OVERRIDE]) ) {
$this->method = $this->post[self::METHOD_OVERRIDE];
unset($this->post[self::METHOD_OVERRIDE]);
if ( $this->isPut() ) {
$this->put = $this->post;
}
} else if(isset($this->headers['x-method-override'] )) {
$this->method = $this->headers['x-method-override'];
if ( $this->isPut() ) {
$this->put = $this->post;
}
}
}
PS - pull request SLIM, , , , , ,