kvz / cakephp-rest-plugin

Discontinued: recent cakephp versions overlap functionality, there also is @ceeram's plugin. Painless REST server Plugin for CakePHP
http://kvz.io/blog/2010/01/13/cakephp-rest-plugin-presentation/
169 stars 37 forks source link

I keep getting an internal server error 500 #22

Open johannesjo opened 12 years ago

johannesjo commented 12 years ago

For all requests are made to the model where the component is called. Everything else looks like it is working.

Here is my controller code: class CommentsController extends AppController { public $components = array ( 'RequestHandler', 'Rest.Rest' => array( 'catchredir' => true, 'actions' => array( 'extract' => array( 'index' => array('comments'), ), ), ), );

public function index() {
    $comments = $this->Comment->find('all');
    // for testing: $comments= array("test","t8adsdas");
    $this->set(compact('comments'));
}

}

johannesjo commented 12 years ago

found the error. i didnt set up a database table for the logs. maybe you should emphasize this in the readme.

johannesjo commented 12 years ago

no its still there if i don't include the request handelere component (which i supose overwrites the plugins functionality)

gmdodd commented 11 years ago

I had the same issue - in cakephp 2.X. In cakephp 2.x you need to manually load any required plugins by adding the following to the bootstrap.php file CakePlugin::loadAll(); or CakePlugin::load('Rest');