CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #3692

Some pages gains "config.no_cache is true" status after few hits

Added by Riccardo De Contardi almost 4 years ago. Updated 1 day ago.

Status:New Start date:2009-06-17
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:2.3.1
Votes: 0

Description

Hello,

I use Typo3 4.2.6, realurl 1.5.3 and nc_staticfilecache 2.3.1, and I experience the following "weird" behaviour:
When I try to make all my site static via a simple "wget -r --no-cache http://typo3.mytestsite", some pages,after a few hits are marked as "config.nocache = 1", as you can see from the attached png file.
The page "sottopagina 21" contains the plugin chgallery, while "dettaglio" contains the plugin tt_news (single view)

My site is also a multilanguage file (I used the "one tree etc." concept), and every page is also "doubled",as I use another globalVar called "logged", and I switch between them via a typolink (in a manner similar to a "print version link", see the attached .t3s file).

So, every url in my site has 4 "flavours":

http://typo3.mytestsite/pagina1/ (normal)
http://typo3.mytestsite/en/page1/ (alternate page language, english in my case)
http://typo3.mytestsite/logged/pagina1/ (alternate version "logged")
http://typo3.mytestsite/en/logged/page1/ (alternate page language && alternate version)

This bug is quite annoying, as I can't guess where the "config.nocache is true" comes from, and it fails me to cache the whole site!

Thank you for your support and Best Regards

Riccardo De Contardi

B Human Srl - www.bhuman.it
Via Canzio, 15 - 20131 Milano
Tel +39.02 20 23 271 - Fax +39.02 20 240 561

Static_File_Cache_1245224116194.png (39.3 kB) Riccardo De Contardi, 2009-06-17 09:56

setup.home.lib.loginLinkDeco.t3s (965 Bytes) Riccardo De Contardi, 2009-06-17 09:56

realurlconf.php (8.6 kB) Riccardo De Contardi, 2011-02-16 09:38

History

Updated by Stefan Galinski over 3 years ago

I experience the same problem and the problem seems to be related with realurl and it's chash management. If I disable realurl, the problem doesn't appears again.

Updated by Riccardo De Contardi over 3 years ago

I've not made a full test, but I've found that setting

$TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] = '1';

via Install Tool seems to fix the problem.

I experience the same problem and the problem seems to be related with realurl and it's chash management. If I disable realurl, the problem doesn't appears again.

If problem is RealURL...what about using COOLURI ? ;)

Thanks for the answer

Updated by Stefan Galinski over 3 years ago

Riccardo De Contardi wrote:

I've not made a full test, but I've found that setting

$TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] = '1';

via Install Tool seems to fix the problem.

Thanks for this hint, but unfortunatly this can't be used in our case.

Updated by Michiel Roos over 3 years ago

Hi Ricardo,

- Can you do a backend search for 'no_cache' to see if it shows up in any TS templates?
- Are you sure you don't use FE_logins?
- Are you sure you are not logged in in the backend in the same browser session you are hitting the frontend with to fill the cache? If you are hitting the FE with a different browser, are you sure that there are no be_typo_user cookies left there?
- Do you have 'console' access? Can you perform a:

cd /bla/bla/site/root/typo3conf/ext/; grep -rl no_cache *;
And see what files come up?

- What is the latest TYPO3 version you can reproduce this issue with?

For me, the latest version is 4.2.11. I see this issue pop up in my site. It caches the page, but the message still says config.no_Cache = 1. I can not find any no_cache in the backend (not in TS). Here is the relevant part of the grep for no_cache in the extension dir:

$ grep -rl no_cache *
comments/pi1/class.tx_comments_pi1.php
comments/class.tx_comments_ttnews.php
nc_staticfilecache/class.tx_ncstaticfilecache.php
nc_staticfilecache/ext_localconf.php
nextprevious/tx_nextprevious.php
realurl/testmod/index.php
realurl/doc/TODO.txt
realurl/class.tx_realurl.php
templavoila/mod2/new_tv_site.xml
templavoila/pi1/class.tx_templavoila_pi1.php
tt_news/pi/class.tx_ttnews.php
tt_news/ChangeLog
tt_news/res/realUrl_example_setup.txt
tt_news/class.tx_ttnews_tcemain.php

I'll check the code that decides whether to cache the page or nog is still identical (functionally) to the code used in the latest TYPO3 versions.

Cheers,

Michiel

Updated by Michiel Roos over 3 years ago

This is a snippet from the tt_news/Changelog:

2004-08-04 rupertgermann * cvsroot/typo3xdev/tx_ttnews/pi/class.tx_ttnews.php 1.31:
- fix for bug id 0000270 'formURL don't support simulate Static'
- fix for bug id 0000274 'double type= parameters'
- fix for bug id 0000269 'Error in frame based pages, missing itemLinkTarget' > thanks christian for report with included solution
- added $GLOBALS['TSFE']
>set_no_cache(); in the search part, cause the search will not work with caching enabled.

Updated by Michiel Roos over 3 years ago

realurl/doc/TODO.txt is also interesting

Updated by Michiel Roos over 3 years ago

When you hover over one of the pages in the info module that has a no_cache message, what does the 'file' or 'uri' say? Does that give any hints to the problem?

Can you turn on the TYPO3 syslog in the install tool?

Then clear the cache, hit the site with wget to rebuild the cache and see where the no_cache is triggered?

Updated by Riccardo De Contardi over 3 years ago

Hello and sorry for my late answer.

Hi Ricardo,

- Can you do a backend search for 'no_cache' to see if it shows up in any TS templates?

grep -rl no_cache *

typo3conf/ext/t3mootools/ext_emconf.php
typo3conf/ext/rt_pageteaser/doc/wizard_form.dat
typo3conf/ext/rt_pageteaser/ext_emconf.php
typo3conf/ext/templavoila/ext_emconf.php
typo3conf/ext/templavoila/cm1/index.php
typo3conf/ext/dam/ext_emconf.php
typo3conf/ext/dam/lib/class.tx_dam_svlist.php
typo3conf/ext/dam/lib/class.tx_dam_simpleforms.php
typo3conf/ext/dam/lib/class.tx_dam_tcefunc.php
typo3conf/ext/dam/components/class.tx_dam_selectionCategory.php
typo3conf/ext/tt_address/static/old/setup.txt
typo3conf/ext/danp_realurlconfigurator/doc/wizard_form.dat
typo3conf/ext/danp_realurlconfigurator/ext_emconf.php
typo3conf/ext/chgallery/doc/wizard_form.dat
typo3conf/ext/chgallery/ext_emconf.php
typo3conf/ext/kickstarter/sections/class.tx_kickstarter_section_pi.php
typo3conf/ext/kickstarter/ChangeLog
typo3conf/ext/kickstarter/ext_emconf.php
typo3conf/ext/kickstarter/class.tx_kickstarter_sectionbase.php
typo3conf/ext/tt_news/pi/news_template.tmpl
typo3conf/ext/tt_news/static/ts_old/setup.txt

- Are you sure you don't use FE_logins?

Yes I am sure. This is the list of installed extensions:
seo_basics 0.6.0
date2cal 7.3.1
kickstarter 0.4.0

dam 1.1.5
danp_realurlconfigurator 1.0.3
crawler 2.1.0
staticpub 1.1.0

cron_accessiblemenus 0.7.0
chgallery 2.5.0
css_styled_content 0.4.0
css_filelinks 0.2.16
pmkslimbox 3.1.0
realurl 1.7.0
nc_staticfilecache 2.3.1

tt_address 2.2.1
sb_downloader 1.0.6
sr_language_menu 1.5.1
tt_news 2.5.2
rt_pageteaser 1.5.0

chloginskin 1.1.0
static_info_tables 2.1.2
t3mootools 1.3.0
templavoila 1.3.7

- Are you sure you are not logged in in the backend in the same browser session you are hitting the frontend with to fill the cache? If you are hitting the FE with a different browser, are you sure that there are no be_typo_user cookies left there?

Well... I user a command-line wget to spider the whole site

I hope to be of some help

Updated by Stefan Galinski over 3 years ago

Hi,

I found the issues in my installation that caused this annoying problem!

  • Problem
    RealURL in combination with pagepath and an unfiltered L variable caused incorrect cHashes (cHash mismatch)

    Solution
    Added filterting for the L variable before the pagepath calls!

  • Problem
    MnoGosearch and a "config.no_cache = 1" inside a special mnogosearch condition caused TYPO3 to disable the cache completely for all crawled pages.
     [useragent = MnoGoSearch/*]
     page.headerData.9999.noTrimWrap = |<title>|</title>|
     config.no_cache = 1
     [global]
    Solution
    Removed the "config.no_cache = 1" inside the mnogosearch condition!

After fixing of these issues the no_cache seems not to appear again. IMHO it's definitly no problem with nc_staticfilecache. :-)

BTW: In Riccardos case the issue can be one of the endless cHash issues of TYPO3 or something similar like mine. Good Luck!

Updated by Stefan Sprenger over 2 years ago

Hi Stefan,

it would be nice if you could explain your solution for the problem that gets caused by incorrect cHashes a little bit more in detail.

Best regards

Updated by Stefan Galinski over 2 years ago

Hi Stefan,

In my case I had an external script that resolves an alias parameter with a given language and returns the URL of this page. This task can be accomplished with the extension pagepath/realurl. Unfortunatly somebody called the script with an incorrect language parameter that caused cHash mismatches. It's a very special case and was definitly my fault in this case.

If you want to read more about cHash issues then just search the bugtracker for this keyword. There are some open issues on this topic.

http://bugs.typo3.org/view_all_bug_page.php

As far as I remember, nc_staticfilecache had an issue that it displayed pages as "no_cache = 1" in the overview if somebody called the page with the no_cache parameter (see my crawling problem). I don't know if this is still valid.

Updated by Stefan Sprenger over 2 years ago

Hi Stefan,

thanks for your answer.

I've fixed the problem by clearing realurl's chash cache.

Regards

Updated by Riccardo De Contardi over 2 years ago

Hello everybody. Sorry for my long absence, I've never had occasion to use the extension for a long time.

I've got only a little question for Stefan Galinski:You say;

# Problem
RealURL in combination with pagepath and an unfiltered L variable caused incorrect cHashes (cHash mismatch)

Solution
Added filterting for the L variable before the pagepath calls!

How can I check this?

In my Realurl configuration I've got:

        array(
            'GETvar' => 'L',
            'valueMap' => array(

                '' => '0',
                'en' => '1',
            ),                
            'noMatch' => 'bypass',
        ),

written before the pagepath array.
should I use
'it' => '0',

?
Attached: the whole configuration used.
Thank you for your answer and best regards

Updated by Stefan Galinski over 2 years ago

Hi Riccardo,

In my case it was a custom php script.At least you should check that you added a range for the L parameter inside your typoscript. Unfortunately this parameter often causes this chash poisoning/mismatches.

Example:

config.linkVars = L(3|12)

Updated by Riccardo De Contardi over 2 years ago

Hello Stefan and thank you for your answer.
I use 2 likVars, with no range:

config{
    linkVars := addToList(L)  
    linkVars := addToList(LOGGED)
}

As I've got only 2 languages and LOGGED is a boolean (the only value I need is "1"); so, If I've understood, I should write:

config{
    linkVars := addToList(L(1))  
    linkVars := addToList(LOGGED(1))
}

or

config{
    linkVars =L(1), LOGGED(1)
}

Is that correct?
Thank you for your answer and support

Updated by Stefan Galinski over 2 years ago

Looks ok... Please tell us if this change fixes your problem.

Updated by Riccardo De Contardi over 2 years ago

Alas, no luck!
I've tried

config{
    linkVars =L(1), LOGGED(1)
}

But there was nothing to do:(
In the realurl config I've tried several configurations:
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                '' => '0',
                'en' => '1',
            ),                
            'noMatch' => 'bypass',
        ),

'' => '0',
'it' => '',
'it' => '0',

// 'it' => '',

But none of them worked.

As I said a long time ago,

$TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] = '1';

Was the only option that worked for me...
Thank you all anyway for your support; if there will be any news, I'll let you know.

Updated by Urs Braem 1 day ago

  • Assignee deleted (Michiel Roos)

I landed here with the same issue. An update of realURL to the latest version (1.12.6) fixed it without having to set $TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] = '1';

Also available in: Atom PDF