Still no success

Thanks for the reply. However I still didn’t success with even calling the default_values() method. (I don’t understand why, the syntax seems correct to me.) Both methods are inside Calendar_Controller class:

  public function events()
    require_once ‘media/calendar/connector/scheduler_connector.php’;    
    $server = Kohana::config(‘’);
      $user      = Kohana::config(‘database.default.connection.user’);
      $pass      = Kohana::config(‘database.default.connection.pass’);
      $db_name= Kohana::config(‘database.default.connection.database’);
      $res=mysql_connect($server, $user, $pass);
      $user_id = intval($_GET[‘user’]);
      $scheduler = new schedulerConnector($res);
    $new_cal = new Calendar_Controller();
      $scheduler->render_sql("select * from events_shared where userId = ".$user_id,“event_id”,“start_date,end_date,text,event_type,userId”);

    protected function default_values($action)
      $this->track('Called default_values with user id '.$this->user->id);
        $event_type = $action->get_value(“event_type”);
        if ($event_type == “”)
            $event_type = 0;

Inside default_values() I call my own logging function that basically will write the user id to database, just to let me know that the function was called for sure.

I don’t get any errors, and my events are saved but with userId=0, instead of the current user id, which is another sign that tells us that the function isn’t called.

I tried both with creating a new instance (as in the example) and with sending ‘$this’. No success. What are your ideas? Thank you!

I don’t get any errors
Is log.txt doesn’t contain any error info as well? Connector catches run-time error to prevent xml output corruption, but saves error info in defined log

I’m not quite sure, but you can try to change the access level of default_values method to the “public”

Thanks a lot for your idea, it worked indeed! The method has to be public to be accessible from the outside of the class (e.g. by an AJAX call). I assumed that default_values() was an internal method, only called from within the class, and hence the protected level would be enough. But as it turns out, we are making an AJAX call with POST data to default_values, and it needs to be public. Thanks again!