Project

General

Profile

Actions

Bug #17652

closed

preprocessing ###REC_FIELD_[fieldname]### marker problem with IRRE

Added by Aldo Polli over 16 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-10-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

class.t3lib_befunc.php.diff (339 KB) class.t3lib_befunc.php.diff Administrator Admin, 2007-10-04 20:02
class.t3lib_befunc.php.diff_01 (269 Bytes) class.t3lib_befunc.php.diff_01 Administrator Admin, 2007-11-16 11:29
class.t3lib_befunc.php.diff_011 (212 Bytes) class.t3lib_befunc.php.diff_011 Administrator Admin, 2007-11-16 12:10
Actions #1

Updated by Florian Zimmermann over 16 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.

Actions #2

Updated by Alexander Opitz almost 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)?

Actions #3

Updated by Florian Zimmermann almost 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.

Actions #4

Updated by Wouter Wolters almost 11 years ago

  • Assignee set to Nicole Cordes
  • TYPO3 Version changed from 4.1 to 6.2
  • PHP Version deleted (4.3)
Actions #5

Updated by Wouter Wolters almost 11 years ago

  • Status changed from Needs Feedback to Accepted
Actions #6

Updated by Nicole Cordes almost 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.

Actions

Also available in: Atom PDF