Bug #19060

"displayCond" => "FIELD:myfield:IN:1,2" is not working correct on DB relations

Added by alex almost 5 years ago. Updated 15 days ago.

Status:Needs Feedback Start date:2008-07-03
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
TYPO3 Version:4.2 Complexity:
PHP Version:5.2
Votes: 0

Description

if setting a displayCond of type FIELD with IN the check is not correct for DB relations because the field value to evaluate is transported with the label in form
uid|label. additonal the check routine fails if you want to test against multiple values in list.

(issue imported from #M8897)

bug_0008897.diff (1.6 kB) Administrator Admin, 2008-07-03 16:47

History

Updated by Peter Niederlag almost 5 years ago

could you please provide a more detailed description? For example, the $TCA where it's failing. Is this within a Flexform?

Updated by alex almost 5 years ago

hi peter,

this has nothing to do with flexforms:

"tx_mdrs24safefeuserfields_last_name" => Array (
"exclude" => 1,
"label" => "LLL:EXT:mdrs_24safe_feuserfields/locallang_db.xml:fe_users.tx_mdrs24safefeuserfields_last_name",
"config" => Array (
"type" => "input",
"size" => "30",
"eval" => "trim",
),
"displayCond" => "FIELD:tx_mdrs24safefeuserfields_products:IN:1,2"

failing if tested against:
"tx_mdrs24safefeuserfields_products" => Array (
"exclude" => 1,
"label" => "LLL:EXT:mdrs_24safe_feuserfields/locallang_db.xml:fe_users.tx_mdrs24safefeuserfields_products",
"config" => Array (
"type" => "select",
"foreign_table" => "tx_mdrs24safeshop_products",
"foreign_table_where" => "ORDER BY tx_mdrs24safeshop_products.uid",
"size" => 5,
"minitems" => 0,
"maxitems" => 10,
"MM" => "fe_users_tx_mdrs24safefeuserfields_products_mm",
)
),

note: it also fails if foreign table is not connect with MM relation but with commalist.

is the problem now understandable?

Updated by Peter Niederlag almost 5 years ago

Yes, although I am astonished by the fact that the value of a select field carries a 'uid|title' value. I'd think/expect in $row only raw values should be shifted around.

Updated by Peter Niederlag almost 5 years ago

I am sorry, I can't confirm this yet. I see only plain uid-values (also I might of course be blind!).

What does the $TCA ctrl-section of 'tx_mdrs24safeshop_products' look like?

Can you please give us the list of installed extensions? Is there maybe a hook running?

I am sry I can't be of more help

Updated by alex almost 5 years ago

more debuging on the issue showed, that the error with manipulated $row just exists if the reference field is configured with maxitems > 1

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

Also available in: Atom PDF