Bug #63406

setRespectStoragePid() of QuerySettings does not work with concrete settings in TCA

Added by Patrik Lang almost 7 years ago. Updated about 3 years ago.

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

100%

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

Description

Hello,

in my opinion there is a bug in the class Typo3DbQueryParser in method addPageIdStatement() on lines 649.

There is a if query which checks if the configured rootLevel param in TCA ctrl section ist set to true (not boolean)

In the TCA documentation you can set this param to 0/1/-1 (@see http://docs.typo3.org/typo3cms/TCAReference/singlehtml/#rootlevel)

When you set the param to -1 (allowed in root AND page tree the additionalWhereClause to check the database pid field will be ignored because the value "-1" is true and the first if query applies but the second not and so no additionalWhereClause is set.

Is this a desired behaviour and I have only missed a separate documentation or is it a bug?

In my Opionion the first if query is superfluous.

I tested it on the version 6.2.7

Kind regards
Patrik


Files

rootlevel_1.0.0_201510010034.zip (7.43 KB) rootlevel_1.0.0_201510010034.zip Daniel Goerz, 2015-10-01 00:38

Related issues

Related to TYPO3 Core - Bug #65277: exclude fields not showing up in "allowed excludefields" if table property rootLevel = -1Closed2015-02-24

Actions
#1

Updated by Patrik Lang almost 7 years ago

Category is extbase, not DBAL, sorry

#2

Updated by Wouter Wolters almost 7 years ago

  • Category changed from 999 to Extbase
#3

Updated by Gerrit Code Review about 6 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/43675

#4

Updated by Daniel Goerz about 6 years ago

Reproduce / Verify:

  1. Install attached Extension "Rootlevel"
  2. Insert the plugin on a page
  3. create records on different pages including pid 0
  4. view the plugin output with and without the patch

Note: The storagePid is configured to pid 9. You can of course overwrite this random number with constant

plugin.tx_rootlevel.persistence.storagePid = 9
#5

Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

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/43675

#6

Updated by Gerrit Code Review about 6 years ago

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

#7

Updated by Daniel Goerz about 6 years ago

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

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF