Project

General

Profile

Actions

Bug #45332

closed

category api won't work when used with multiple tables

Added by Thomas Allmer almost 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2013-02-09
Due date:
% Done:

100%

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

Description

if you have tableA, and tableB both using the category api the function
\TYPO3\CMS\Core\Category\Collection\CategoryCollection::load(...)
will return wrong results

example:
tableA has an element A1, A2, A3
tableB has an element B1, B2, B3

A1 is in the category c1
B2 is in the category c1
B3 is in the category c1

now if you use the function to get c1 of tableA it will give u A1, A2, A3 even though ONLY A1 is in the category... (as it will also get B2, B3 and as the id element is also available for tableA it shows them..

the function getCollectedRecords only checks for uid and not for the tablename
the solution is simple... just add a
"AND sys_category_record_mm.tablenames = <table_to_display>"


Files

45332.diff (1.26 KB) 45332.diff Marc Wöhlken, 2013-05-28 21:24

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #50091: Category API: Add test for categories with multiple tablesClosed2013-07-16

Actions
Actions

Also available in: Atom PDF