When I want the items in a selectbox to be taken from the database I get to see the column nr (the place it has in the db structure) only in the tree structure. It should be taking the name of the column instead. I did a quick fix, no time to check it in other places, nor to see if this is already a known issue...
\system\modules\catalog\dca\tl_catalog_fields.php
Code:
public function getTableFields(DataContainer $dc)
{
$objTable = $this->Database->prepare("SELECT itemTable FROM tl_catalog_fields WHERE id=?")
->limit(1)
->execute($dc->id);
if ($objTable->numRows > 0 && $this->Database->tableExists($objTable->itemTable))
{
$fields = $this->Database->listFields($objTable->itemTable);
// Fix start:
$arrReturn = array();
foreach($fields as $field) {
$arrReturn[$field['name']] = $field['name'];
}
return $arrReturn;
// Fix end;
return array_map(create_function('$x', 'return $x["name"];'), $fields);
}
}
Bookmarks