Bug #54250

Extbase: MM_match_fields is not considered in MM-Selects

Added by Stefan Froemken over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2013-12-06
Due date:
% Done:

0%

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

Description

Hello Extbase-Team,

I have a category field in my extension:

'categories' => array(
    'exclude' => 1,
    'label' => 'LLL:EXT:jw_forms/Resources/Private/Language/locallang_db.xml:tx_jwforms_domain_model_form.categories',
    'config' => array(
        'type' => 'select',
        'foreign_table' => 'sys_category',
        'MM' => 'sys_category_record_mm',
        'MM_match_fields' => array(
            'tablenames' => 'tx_jwforms_domain_model_form',
        ),
        'MM_opposite_field' => 'items',
        'renderMode' => 'tree',
        'treeConfig' => array(
            'rootUid' => 0,
            'parentField' => 'parent',
            'appearance' => array(
                'showHeader' => TRUE,
                'expandAll' => FALSE,
            ),
        ),
        'minitems' => 0,
        'maxitems' => 5,
    ),
),

Then I build my query:

if ($settings['categories']) {
    $categories = t3lib_div::trimExplode(',', $settings['categories']);
    $constraintAnd[] = $query->in('categories.uid', $categories);
}

As you know the categories has to be differed by tablenames, but this querypart isn't there. This results in wrong records from db.

Stefan

#1

Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25985

#2

Updated by Marc Bastian Heinrichs over 7 years ago

Please read #10487 #11251 and #39256. The whole MM_match_fields problem would not be fixed by this 5 liner.

#3

Updated by Ernesto Baschny about 7 years ago

  • Project changed from 534 to TYPO3 Core
  • Category deleted (Extbase: New Persistence)
#4

Updated by Ernesto Baschny about 7 years ago

  • Subject changed from MM_match_fields is not considered in MM-Selects to Extbase: MM_match_fields is not considered in MM-Selects
  • Category set to Extbase
  • Is Regression set to No
  • TYPO3 Version set to 6.2
#5

Updated by Frans Saris about 7 years ago

  • Status changed from Under Review to Closed

Is resolved by #10487

Also available in: Atom PDF