Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthoralake
     

    I have a controller that has worked as I designed it. I added three fields to the table (called "users") that the controller references and regened it with "./script/migrate User uninstall" followed by "./script/migrate User install". The table structure looks just fine. I am able to add a record with Webmin OK.

    I am attempting to reenter the data with this controller. Within my add method, I have this code

    if ($this->Request->isPost()) { echo "this->Request->isPost<br />"; var_dump($this->user); if($this->user->save()){ echo "this->user->save<br />"; } else { echo "record not saved"<br />"; } }

    I execute the first echo and the var_dump. All appears normal. I have "DEBUG" turned on and mysql statements that maintain the session are present. When I execute $this->user->save(), everything stops. The remaining echo statements are not executed.

    I hesitate to recreate the controller because I've customized it quite a bit. What further steps might I take to analyze this problem?

    • CommentAuthorsalavert
     

    Check functions like validate, afterCreate, beforeSave, etc.. can't work without a return at the end.

    Could you paste your model?

    • CommentAuthoralake
     

    <embarrassed>I had a stray "exit" in some debugging code in my model.</embarrassed>. Of course, I don't know if that's my only problem, but it's a definite show stopper. Thanks, Salavert, for pointing me in the right direction.

    One of the things that I am trying to do as I get more familiar with Akelos is to document what I'm learning, not only for my own benefit, but for the community. However, in writing documentation, one sometimes has to record things that he is not involved in at the moment.

    A piece of documentation that I'm working on at the moment is what user code affects the flow of control within a program. I'm not quite ready to put it on the Wiki, but I know it's not correct because I don't see how routes affect this flow. Is there a volunteer who really knows what's going on in Akelos who might review my documentation, preferably before it's published, so that it is at least technically correct?