Hallo,
in meiner extension habe ich ein problem mit dem irre und ich komme einfach nicht darauf, wo der fehler liegen soll... #angry#
bspw. die relation folgender tabellen:
(employee)--(emp_contact)--(contact)
beim bearbeiten des employee-datensatzes im backend werden die input-felder des contact-datensatzes (über irre) leer angezeigt,
obwohl values in der datenbank stehen. das speichern/ändern der werte funktioniert einwandfrei, jedoch werden die felder
weiterhin leer angezeigt (nur im backend).
das lustige ist, dass wenn ich das feld der tabelle contact im tca nicht als "input" definiere, sondern als bspw. "text"
funktioniert alles einwandfrei (ausser eben, dass ich kein text-feld haben will).
Es funktioniert auch, wenn ich in der employee-tabelle die option foreign_unique nicht definiere (allerdings wird dann
der bereits in relation stehende contact-datensatz im foreign-selector weiterhin aufgelistet).
ausserdem steht in der doku zu der option useCombination:
If using a foreign_selector in such a case, the foreign_unique property must be set to the same field as the foreign_selector.
kann mir hier jemand weiterhelfen?
hier ein auszug aus meinen tca-definitionen:
(employee)
"contacts" => Array (
"label" => "LLL:EXT:employeelib/locallang_db.xml:tx_employeelib_emp_contact",
"config" => Array (
"type" => "inline",
"foreign_table" => "tx_employeelib_emp_contact",
"foreign_field" => "parentid_1",
"foreign_table_field" => "parenttable_1",
"foreign_label" => "parentid_2",
"foreign_selector" => "parentid_2",
"foreign_unique" => "parentid_2",
"appearance" => array (
"useCombination" => 1,
"newRecordLinkAddTitle" => 1,
"expandSingle" => 1,
"collapseAll" => 1,
"newRecordLinkPosition" => "bottom"
)
)
),
(emp_contact)
"parentid_1" => Array (
"exclude" => 0,
"label" => "LLL:EXT:employeelib/locallang_db.xml:tx_employeelib_emp_contact.parentid_1",
"config" => Array (
"type" => "select",
"foreign_table" => "tx_employeelib_employee",
"foreign_table_where" => "AND tx_employeelib_employee.pid=###STORAGE_PID### ORDER BY tx_employeelib_employee.uid",
"size" => 1,
"minitems" => 1,
"maxitems" => 1,
)
),
.........
"parentid_2" => Array (
"exclude" => 0,
"label" => "LLL:EXT:employeelib/locallang_db.xml:tx_employeelib_emp_contact.parentid_2",
"config" => Array (
"type" => "select",
"foreign_table" => "tx_employeelib_contact",
"foreign_table_where" => "AND tx_employeelib_contact.pid=###STORAGE_PID### ORDER BY tx_employeelib_contact.type,tx_employeelib_contact.prefix,tx_employeelib_contact.extension,tx_employeelib_contact.direct",
"size" => 1,
"minitems" => 1,
"maxitems" => 1,
)
),
(contact)
"direct" => Array (
"exclude" => 0,
"label" => "LLL:EXT:employeelib/locallang_db.xml:tx_employeelib_contact.direct",
"config" => Array (
"type" => "input",
"size" => "30",
)
),