Friday, February 21, 2014

Re: hasMany through: my neverending problem?

Hi Sam,

try to add $uses to your controller, the controller don't find you model ... It seems you are using a plugin, maybe this will help the controller ...

<?php

class AccessibilitiesAttractionsController extends CoasterCmsAppController
{
public $helpers = array('Html', 'Form', 'Session');
 public $components = array('Session');
public $uses = array('CoasterCms.AccessibilityAttraction'); 

  public function index(){

}

...

 when you get "Call to a member function find() on a non-object" then is the object not created ...in your case the model this has nothing to do with the model at all

I hope it will help you ...

regards Wilderland

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: