Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorklausEC
    First of all, I am sorry for making a discussion about this topic, since I know its already well debated.
    Yet I feel the need to do this, to make progress in my project.

    my controller:

    class SignalsController extends ApplicationController
    var $layout = 'configuration';
    var $models = "user, resource, signal";
    var $resources = "all, signals";


    function edit()
    $this->signal = $this->Signal->find($this->params['id']); //<---- line 59



    The reason why I create this discussion is, that the code above works fine - on my computer... As soon as I have migrated the code, it doesn't - then I get the error:
    Fatal error: Call to a member function find() on a non-object in /[path]/app/controllers/signals_controller.php on line 59

    It is the only place on my site it doesn't work - everywhere else, it works like a charm.

    I have made sure, that the database is correct on both sides, the data content is correct, the code is the same (deploying using SVN), and the config.php is set to use the correct database as well.
    I can't seem to find a reason to this problem - I have had another programmer look at is as well, with no luck.

    All ideas are most welcome!
    Thank you in advance.
    • CommentAuthorpogeybait4883

    Without knowing how your app is setup I cant really speculate why this doesnt work but I do see something that is not right. Your controller is plural. It should be:

    class SignalController extends ApplicationController

    Controller names are always singular. I would suspect that the controller cannot find your 'Signal' model because in your case it would be looking for a model called 'Signals'.

    • CommentAuthorklausEC
    oh, yeah - thats true.

    In the meantime, I have found the error - and it was ofcourse a human mistake... there WAS a difference between the two databases... even though I couldn't spot it yesterday! oh well! :)

    thank you anyway :)