Project

General

Profile

Actions

Bug #60697

closed

Recursive storagePid does not work in command controller

Added by KJ Kooistra almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2014-07-31
Due date:
% Done:

100%

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

Description

I created a basic command controller which retrieves records from an Extbase repository but failed to retrieve any records. When debugging the query I noticed that the where statement checks for pid IN, which is the negative ID of the storage folder I configured in the module.tx_extension.persistence.storagePid, together with persistence.recursive = 2.

When debugging further I found that in TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getConfiguration() the ID is negated ($storagePid = -$storagePid). The comment above states:
// All implementations of getTreeList allow to pass the ids negative to include them into the result
// otherwise only childpages are returned

However the BackendConfigurationManager calls \TYPO3\CMS\Core\Database\QueryGenerator::getTreeList(), which does not support negative ids. Because of that the recursion will not work either because there are no pages with pid -16.

The FrontendConfigurationManager calls \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList(), which checks for the negative ID and uses abs() to make it positive again. When I do this in the QueryGenerator getTreeList it works as expected.

In addition to this: Can anyone tell me how to configure a command controller/scheduled task to use a specific root page? I know you can set parameters from the scheduler, but the TypoScript configuration seems to be already loaded from the first found root page before the controller is executed. The only way to override this seems to be by using an URL parameter id, but I'm not sure how to do this with a command controller running from the scheduler.

Actions #1

Updated by Gerrit Code Review almost 10 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 http://review.typo3.org/31919

Actions #2

Updated by Gerrit Code Review almost 10 years ago

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

Actions #3

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32331

Actions #4

Updated by Anonymous over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF