Project

General

Profile

Actions

Bug #49125

closed

makeCategorization - category

Added by daniel no-lastname-given about 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Categorization API
Target version:
-
Start date:
2013-06-14
Due date:
% Done:

0%

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

Description

Hi i have the following issue:

it is written in the description for the new feature category:

$categoryUid = 1;
$tableName = 'tt_content';
$collection = \TYPO3\CMS\Core\Category\Collection\CategoryCollection::load(
$categoryUid, # Populates the entries directly on load, might be bad for memory on large collections
TRUE,
$tableName
);

But if i just want to get the entrys for the tt_content table, it doesn't work.

For example if i have the following entries:

entry 1: tt_content table
entry 2: tx_myownextension table

in my category (mycategory).

if i would like to have only the entries from the tt_content table it doesnt work because it shows all the entries - in total 2. Isn't that wrong? It only has to show the entry for the tt_content table?

I figured out that the sql statement in typo3\sysext\core\Classes\Category\Collection\Category\CategoryCollection.php in line 110:
$resource = $this->getDatabase()->exec_SELECT_mm_query($this->getItemTableName() . '.*', self::$storageTableName, 'sys_category_record_mm', $this->getItemTableName(), 'AND ' . self::$storageTableName . '.uid=' . intval($this->getIdentifier()));
doesn't use the column given by parameter $tableName. so i changed it to:
$resource = $this->getDatabase()->exec_SELECT_mm_query($this->getItemTableName() . '.*', self::$storageTableName, 'sys_category_record_mm', $this->getItemTableName(), "AND tablenames = '".$this->getItemTableName()."' ".'AND ' . self::$storageTableName . '.uid=' . intval($this->getIdentifier()));
and now it works. is that correct or did you have other plans with $tableName ??

greetz
daniel

Actions #1

Updated by Francois Suter over 10 years ago

  • Category set to Categorization API
  • Status changed from New to Needs Feedback
  • Assignee set to Francois Suter
  • Target version set to next-patchlevel
  • PHP Version set to 5.3
  • Complexity set to medium
  • Is Regression set to No

Could you test this again with 6.2 (either current master or latest beta)? The code was changed (pretty much in the way you suggest). If it works the relevant part could be backported to 6.1.

Actions #2

Updated by Alexander Opitz about 10 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Francois Suter)
  • Target version deleted (next-patchlevel)

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF