I think I found the problem within the same file. This is J-Cook generated code with no mods:
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_lkm.edit.licensesitem.data', array());
if (empty($data)) {
//Default values shown in the form for new item creation
$data = $this->getItem();
// Prime some default values.
if ($this->getState('licensesitem.id') == 0)
{
$jinput = JFactory::getApplication()->input;
$data->id = 0;
$data->joomla_access = $jinput->get('filter_joomla_access', $this->getState('filter.joomla_access'), 'INT');
$data->licensed_user = $jinput->get('filter_licensed_user', $this->getState('filter.licensed_user'), 'INT');
$data->creation_date = null;
$data->expiration_date = null;
$data->product = $jinput->get('filter_product', $this->getState('filter.product'), 'INT');
$data->asset_name = null;
$data->mac_address = null;
$data->days_override = 0;
$data->key_file = null;
$data->license_id = null;
$data->details = 'View';
$data->admin_notes = null;
$data->published = 1;
$data->set_for_del = 0;
$data->support_level = $jinput->get('filter_support_level', $this->getState('filter.support_level'), 'INT');
$data->licensed_user = $jinput->get('filter_licensed_user', $this->getState('filter.licensed_user'), 'INT');
$data->product = $jinput->get('filter_product', $this->getState('filter.product'), 'INT');
$data->_product_product_type = $jinput->get('filter_product_product_type', $this->getState('filter.product_product_type'), 'INT');
$data->support_level = $jinput->get('filter_support_level', $this->getState('filter.support_level'), 'INT');
}
}
return $data;
}
Notice the duplicate entries for $data->licensed_user near the bottom.
My old component generated with J-Cook v2.6 looked like this:
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_lkm.edit.licensesitem.data', array());
if (empty($data)) {
//Default values shown in the form for new item creation
$data = $this->getItem();
// Prime some default values.
if ($this->getState('licensesitem.id') == 0)
{
$jinput = JFactory::getApplication()->input;
$data->id = 0;
$data->joomla_access = $jinput->get('filter_joomla_access', $this->getState('filter.joomla_access'), 'INT');
$data->licensed_user = $jinput->get('filter_licensed_user', $this->getState('filter.licensed_user'), 'INT');
$data->creation_date = null;
$data->expiration_date = null;
$data->product = $jinput->get('filter_product', $this->getState('filter.product'), 'INT');
$data->asset_name = null;
$data->mac_address = null;
$data->days_override = 0;
$data->key_file = null;
$data->license_id = null;
$data->details = 'View';
$data->admin_notes = null;
$data->published = 1;
$data->set_for_del = 0;
$data->support_level = $jinput->get('filter_support_level', $this->getState('filter.support_level'), 'INT');
}
}
return $data;
}
I am going to try and mod the code in the v2.6.2 component and see how it goes. I will post the results.