[TYPO3-mvc] IRRE issue with multiple selected categories - only first category is "regonized"
Søren Malling
soren.malling at gmail.com
Thu Aug 19 13:47:42 CEST 2010
Hi,
I've got the following issue:
I'm building a mediadatabase where the medias can contain several
categories. The categories are handled through IRRE and the TCA looks
like this
'categories' => array(
'exclude' => 0,
'label' =>
'LLL:EXT:mediadatabase/Resources/Private/Language/locallang_db.xml:tx_mediadatabase_domain_model_media.categories',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tx_mediadatabase_domain_model_media_category_rel',
'foreign_field' => 'mediaid',
'foreign_selector' => 'categoryid',
'foreign_unique' => 'categoryid',
'foreign_sortby' => 'mediasort',
'foreign_label' => 'categoryid',
'maxitems' => 9999,
'size' => 5,
'appearance' => array(
'collapse' => 0,
'newRecordLinkPosition' => 'bottom',
'useCombination' => 1,
),
)
),
In my media model, one of my media object the categories field
contains the value "3", even though several categories are chosen in
the backend. In the frontend, this brings up an issue with the
findByCategories() function. If i click on the category with uid 3 i
get the before mentioned object correctly.
SELECT tx_mediadatabase_domain_model_media.* FROM
tx_mediadatabase_domain_model_media WHERE
tx_mediadatabase_domain_model_media.categories = '3' AND
tx_mediadatabase_domain_model_media.deleted=0 AND
tx_mediadatabase_domain_model_media.t3ver_state<=0 AND
tx_mediadatabase_domain_model_media.hidden=0 AND
tx_mediadatabase_domain_model_media.sys_language_uid IN (0,-1) AND
tx_mediadatabase_domain_model_media.pid IN (27)
But if I click the category with uid 4, i don't get the before mentioned object.
SELECT tx_mediadatabase_domain_model_media.* FROM
tx_mediadatabase_domain_model_media WHERE
tx_mediadatabase_domain_model_media.categories = '4' AND
tx_mediadatabase_domain_model_media.deleted=0 AND
tx_mediadatabase_domain_model_media.t3ver_state<=0 AND
tx_mediadatabase_domain_model_media.hidden=0 AND
tx_mediadatabase_domain_model_media.sys_language_uid IN (0,-1) AND
tx_mediadatabase_domain_model_media.pid IN (27)
I'm pretty (if not 100%) sure that the issue is in my IRRE above, but
can someone tell me, if there is a best practise for extbase and irre?
Should I avoid using the "useCombination" possibility and instead
present the data in a select element instead?
All suggestions are welcome :)
Thanks!
Søren Malling
Twitter: twitter.com/sorenmalling
More information about the TYPO3-project-typo3v4mvc
mailing list