setRespectStoragePid() of QuerySettings does not work with concrete settings in TCA
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
Updated by Daniel Goerz about 6 years ago
- File rootlevel_1.0.0_201510010034.zip rootlevel_1.0.0_201510010034.zip added
- Status changed from Under Review to New
Reproduce / Verify:
- Install attached Extension "Rootlevel"
- Insert the plugin on a page
- create records on different pages including pid 0
- 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