Bug #22878
closed
Flexform field "group, db" doesn't show saved records
Added by Thomas Deinhamer over 14 years ago.
Updated almost 14 years ago.
Description
When configuring a flexform for a plugin content element with a group field of internal_type 'db', after adding records and saving, the records will get stored in the database, but after the form is rendered again after saving, the records are gone in the form - they're not shown at all.
(issue imported from #M14722)
Files
This is really weird, because it is working with another plugin I coded, but only in this one case, in this one plugin, it doesn't work. I attached the flexform XML which was saved to the database. Any ideas?
I found the cause of the problem.
In my TCA (ext_tables.php) I have the following:
$TCA['tx_hypedirectory_domain_model_register'] = array(
'ctrl' => array(
// all other valid TCA ctrl stuff is here
'thumbnail' => 'images',
),
);
My table has NO images field. The weird result is, that records of this table won't be shown in select fields of type 'group, db'. They're stored in the database, but when opening the content element, the select field is not populated with the records. So when saving again, the field will be stored empty.
Removing the 'thumbnail' => 'images' definition has solved the problem, but it would be better to even render the records also if there is no thumbnail field in the table.
I guess it's a simpe MySQL eror due to the missing database field. So did you check your MySQL log?
If this is the case, the bug is in your setup not in the core.
Yes, the API takes your setup as valid and doesn't validate individual fields, which would only take too much time and resources. So simply get your TCA correct and it should work.
Also available in: Atom
PDF