Bug #17652
closedpreprocessing ###REC_FIELD_[fieldname]### marker problem with IRRE
0%
Description
Hi,
this is the situation:
I have a relation 1:n between 2 tables;
I use IRRE for inline editing of the child records;
in the child table I have a field of type 'select' that implements another relation with another big table;
when I edit the child records I want to filter the items of this field,
so I use the ###REC_FIELD_[fieldname]### marker
when I create a new child record with IRRE,
the preprocessing of the ###REC_FIELD_[fieldname]### marker returns an empty string
if the filed is numeric I got an sql error an the child record doesn't render in the form
TCA example:
"childField" => Array (
"config" => Array (
"type" => "select",
"foreign_table" => "anotherTable",
"foreign_table_where" => " AND anotherTable.anotherField=###REC_FIELD_filterField### ORDER BY anotherTable.uid",
SQL result:
AND anotherTable.anotherField= ORDER BY anotherTable.uid
I propose a patch to return 0 in case of a numeric field
Ciao,
Aldo Polli
(issue imported from #M6455)
Files
Updated by Florian Zimmermann about 17 years ago
If you doesn't write the FIELD in lowercase in the TCA File you will get no result.
So I added to the patch a lowerstring conversation but only with ascii table.
My question now is who could I find out the encoding of the Database?
I also updated the File.
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Florian Zimmermann over 11 years ago
In TYPO3 4.5.25 still exists. Imho right now is it not a bug. If you write correct code with field names in lowercase everything works fine.
I have tested it with the TCA.php from templavoila.
LINE 26 change the UID to uppercase and I could select the same record as parent record.
'foreign_table_where' => 'AND tx_templavoila_tmplobj.parent=0 AND tx_templavoila_tmplobj.uid!=\'###REC_FIELD_uid###\' ORDER BY tx_templavoila_tmplobj.title',
So I vote for close.
Updated by Wouter Wolters over 11 years ago
- Assignee set to Nicole Cordes
- TYPO3 Version changed from 4.1 to 6.2
- PHP Version deleted (
4.3)
Updated by Wouter Wolters over 11 years ago
- Status changed from Needs Feedback to Accepted
Updated by Nicole Cordes over 11 years ago
- Status changed from Accepted to Closed
The mentioned problem only occurs if the field name isn't set according to database field. So there isn't any change needed.