Bug #32212

select.pidInList = 0 won't select records with pid = 0

Added by Soeren Kracker over 3 years ago. Updated over 3 years ago.

Status:Resolved Start date:2011-11-30
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:TypoScript Spent time: -
Target version:-
TYPO3 Version:4.6 Is Regression:
PHP Version:5.3 Sprint Focus:
Complexity:

Description

Following Typoscript:

10 = CONTENT
10 {
    table = static_countries
    select {
        pidInList = 0
        orderBy = cn_short_en
    }
    renderObj {
        field = cn_short_en
    }
}

It won't get any records because of this code (pidInList will be unset):
if (!$conf[$property]) {
    unset($conf[$property]);
}

Maybe we can change it to:
if (!$conf[$property] && $conf[$property] != 0) {
    unset($conf[$property]);
}

Don't know if this is the right solution or has any side effects though.

32212.diff Magnifier - Described change as diff file (466 Bytes) Soeren Kracker, 2011-11-30 15:37

32212.diff Magnifier - updated version (467 Bytes) Soeren Kracker, 2011-11-30 15:49


Related issues

duplicates Core - Bug #31209: CONTENT still can't select records from rootpage Closed 2011-10-24

History

#1 Updated by Soeren Kracker over 3 years ago

Attached my described change in typo3_src/typo3/sysext/cms/tslib/class.tslib_content.php

I'm new to bug reports. Hope the diff file is set up correctly.

#2 Updated by Soeren Kracker over 3 years ago

hm, of course !== 0 ;)

edit: a bit too hasty. The problem lies in function stdWrap.
Maybe we could save the initial value of $conf[$property] and compare later on (before unset) if it has been 0.

#3 Updated by Ernesto Baschny over 3 years ago

  • Status changed from New to Resolved

Resolved with the same fix already merged in #32374.

Also available in: Atom PDF