Your first var_dump log shows that the form is correctly cathed, you see that the values was "'test for Romkabouter"
This leads me to think that after $commentaire =$form["commentaire"];
$commentaire will hold the string 'test for Romkabouter"
So, instead of
$commentaire = $jinput->post->get('commentaire', '', 'RAW');;
do
$commentaire =$form["commentaire"];
The complate function save will be this (I have left out create date because you use $date which was not declared, I also simplified a bit):
public function save($key = null, $urlVar = null)
{
JSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));
$result = parent::save();
//Get the model through postSaveHook()
if ($this->model)
{
$model = $this->model;
$item = $model->getItem();
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
$form = $jinput->get('jform',array(),'ARRAY');
$commentaire =$form["commentaire"];
if (!empty($commentaire))
{
$commentaireModel = CkjModel::getInstance('Commentaire','Maintenance2CkModel');
$commentaireModel->save(array(
'id' => 0,
'created_by' => (int)$user->id,
'ticket' => $item->id,
'comment' => $commentaire
));
}
}
}
I am using an almost similar in a forked controller as will, which works fine.
Remove the fork of the table, you do not need it.
EDIT: I think I read it wrong, you did a var_dump twice.... but $commentaire shows a correct value right?
If is does not work, I'd first try to hard code some values. Just to see of you can save data into the comments table