[TYPO3-core] RFC: #12169: Sitemap: Recently updated pages broken

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Oct 12 14:17:55 CEST 2009


Hi Steffen,

this behaviour was probably introduced in rev.5389 by Oli [1].

In this change, a "code-cleanup" ended up changing the semantics. And I
think it would be best to fix it there. In method
tslib_cObject::getWhere, this change:

<		if (trim($conf['pidInList']))	{
>		if (strcmp(trim($conf['pidInList']), '')) {

Meaning previously pidInList=0 was not adding the "AND pid=0" clause,
after this patch it does, causing the effect you had. The part where you
fixed it was there since the early beginnings of TYPO3 (code is from
Kasper).

So it might be that more stuff (and extension) are broken considering
this change in behaviour.

Cheers,
Ernesto

[1] http://forge.typo3.org/repositories/diff/typo3v4-core?rev=5389
Steffen Kamper schrieb:

> this is a SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=12169
> 
> Branches: Trunk (have to check older verions too)
> 
> the Sitemap with Menu type "Recently updated pages" does nothing show in
> the Frontend. I selected the root page as starting point, but there are
> no updates of pages shown.
> 
> Same happen when using it from TS, try:
> page.100 = HMENU
> page.100 {
>     special = updated
>     special {
>         value = 1
>         mode = tstamp
>         depth = 5
>         maxAge = 3600*24*300
>         limit = 5
>     }
>     wrap = <div class="updated">|</div>
>     1 = TMENU
>     1.NO.stdWrap.cObject = COA
>     1.NO.stdWrap.cObject {
>         1 = TEXT
>         1.field = title
>         1.wrap = <h3>|</h3>   
>     }
>     
> }
> 
> Solution:
> parameter 'pidInList' is hardcoded to 0, which leeds to query part "AND
> pages.pid IN (0) which is obviously wrong.
> 
> I solved it with
> $pidInList = $idList ? '0,' . $idList : '0';
> 
> which gives the correct result.
> I also cleaned up with CGL this part of the menu and replaced vars like
> $bA with $beginAtList for better reading.
> 
> 
> vg Steffen
> 


More information about the TYPO3-team-core mailing list