[TYPO3-dev] DBAL problems with pages.fe_group

Franz Holzinger franz at fholzinger.com
Sun Nov 4 14:30:20 CET 2007


Martin Kutschker a écrit :
> Martin Kutschker schrieb:
>> Martin Kutschker schrieb:
>>
>>>
>>> So what is best option?
>>>
>>> a) Simply to remove the NOT NULL and the then useless DEFAULT '0'?
>>> b) Adding TCA options that enforce the SQL default in situations like
>>> this?
>>> c) Add DB triggers that turn '' into '0' for such fields?
>>>
>>> I'm for a) If the field is a list then '' is an empty list not '0'.
>>> But is the Core ready for this?
>>
>>
>> No, it isn't. See bug #2866.
>>
>> Without changing the Core it must be c) then.
> 
> create or replace trigger "pages_fe_group"
> before insert on "pages"
> for each row
> when (NEW."fe_group" is null or NEW."fe_group" = '')
> begin
> :NEW."fe_group" := '0';
> end;
> 
> I guess that such a trigger is only needed for varchars where TYPO3 will
> insert/update '' but really means '0'.
> 
> IMHO this should be changed in 4.1/4.5. I think that the "default" of
> '0' should go after all a list may be empty.
> 
> But for now this works with Oracle.
> 
> Masi
> 
> PS: Oracle XE is really a nice and free playground.

Hello Masi,

please have a look at http://bugs.typo3.org/view.php?id=4396.
The function getTreeList does not delivery a subpage if the fe_group=''.

example call
$this->pibase->cObj->getTreeList($val,$recursive);

So this seems to be a bug still present in TYPO3 4.1.1

- Franz











More information about the TYPO3-dev mailing list