Bug #7202
All pages display content of homepage
| Status: | New | Start date: | 2010-04-09 | |
|---|---|---|---|---|
| Priority: | -- undefined -- | Due date: | ||
| Assignee: | Michiel Roos | % Done: | 0% |
|
| Category: | - | |||
| Target version: | 2.3.1 | |||
| Votes: | 0 |
Description
Hello,
I have a big problem using nc_staticfilecache.
First I thought it was a RealUrl-problem but since I disabled nc_staticfilecache the problem does not occur anymore.
Thats why I now believe it came from this extension.
When I have my cache freshly cleared everything is fine.
But after some time, some pages begin to display the content of the Home page instead of their own.
First only a few but then more and more until almost all of my pages do so.
When I clear the cache again, the problem is solved - but soon again it starts from the begining again, first one page shows the wrong content, then 2 and so on...
Tried with several browsers (FF, IE, Safari, Opera, Chrome) on 4 different computers (2 desktop, 2 Notebooks) and my mobile phone (HTC HD2, Windows Mobile, Opera).
And of course I cleared the browser Cache, Cookies etc. several times, did F5-reloads and so on.
Does anyone else know this problem or does anyone habe an Idea how to solve it?
Im running TYPO3 4.3.3 (since today, but the problem also occured in the past when the TYPO3 version was 4.2.x and 4.3.x) on a shared T3-Hosting (at Mittwald).
Thank you in advance for any help!
Torsten
History
Updated by Steffen Gebert about 3 years ago
Hi Torsten
think this is more a topic for the mailing lists.
Have a look at the static generated HTML files in typo3temp/tx_ncstaticfilecache/. Are they generated correctly or are they also showing wrong content?
Steffen
Updated by Torsten Schneider about 3 years ago
Hello Steffen,
already tried in the german newsgroup on few weeks ago but did not get any answer so far - but then, I must admit, I thought it was a RealUrl problem.
But as I have seen now the problem only occurs when Static File Cache is active, too.
About you question:
The generated pages in the static file cache folder show the correct pages, as far as I have seen it.
Thank you!
Torsten
Updated by Steffen Gebert about 3 years ago
already tried in the german newsgroup on few weeks ago but did not get any answer so far
That's why I always use the english list ;-)
The generated pages in the static file cache folder show the correct pages, as far as I have seen it.
Then please try to play around with the RewriteRules in .htaccess. Something must go wrong there, when you're delivered other pages. Or try to access the cache files directly (by accessing http://example.com/typo3temp/tx_ncstaticfilecache/...
Steffen
Updated by Torsten Schneider about 3 years ago
Hello Steffen,
I tried several versions of the rewrite rules.
Since I use RealUrl with .html as suffix I already use the simulatestatic-versions.
But somehow I'm unable to understand, how the rules could be a problem.
If this would be the case, shouldn't the results always be wrong?
The problem always does not occur at once.
After clearing the cache everything is ok. Then I visit a page. Its ok, it gets cached, I revisit it with other browsers, it is loaded from the static cache (tested by adding some text to it)and its still ok.
But after some time, sometimes after a few hours, sometimes after a day, sometimes just a few minutes after clearing the cache the first pages (that worked correctly on each try before) start to show the content from the Homepage. Not all at once. Ii happens kind of top level to low levels down the page tree.
And after some time nearly all of the pages show the homepages content.
I know this must sound totally weird... but this is what happens - and I can see no logic behind the way it happens...
Thank you for your ongoing help!
Torsten
Updated by Steffen Gebert about 3 years ago
Torsten Schneider wrote:
But somehow I'm unable to understand, how the rules could be a problem. If this would be the case, shouldn't the results always be wrong?
Yes, it sounds weird, but otherwise I can't understand, why your cache files are created correctly, but not delivered. As this is only done by mod_rewrite, the error must happen there (IF your cache files are created correctly - please check this the next time). And, of course, make sure that none of the other conditions match while debugging (no BE login cookie etc.).
So far, I don't have any further ideas or suggestions.
STeffen
Updated by Torsten Schneider about 3 years ago
Hello Steffen,
thank you very much for your help.
I will turn Static File Cache on again in order to test once more.
Torsten
Updated by Torsten Schneider about 3 years ago
Hello Steffen,
the error "finally" occurs again.
Here is one example, maybe you want to look at it:
http://www.dein-rhein-main.de/staedte/worms.html
displays the homepage.
Once I remove the staticfilecache settings from the .htaccess, the page shows the correct page, but as soon as it loads the page from the staticfilecache, it does not work correctly.
Do you have any ideas, how this could be solved, since I would like to keep using nc_staticfilecache!
Thank you very much!
Torsten
Updated by Steffen Gebert about 3 years ago
Your cache file also contains the wrong contents, doesn't it? This is weird...
Steffen
Updated by Michiel Roos about 3 years ago
Hi Torsten,
When I call http://www.dein-rhein-main.de/?no_cache=1 the page should be served from TYPO3 and not from static file cache. When I call the page http://www.dein-rhein-main.de/staedte/worms.html?no_cache=1 I get the page for Worms. So TYPO3 does a good job.
Please try the attached version (soon to be released after I have updated the manual).
Kind regards,
Michiel
Updated by Torsten Schneider about 3 years ago
Hello Steffen, hello Michiel:
Steffen wrote:
Your cache file also contains the wrong contents, doesn't it? This is weird...
I just looked on the server via ftp and saw one more strange thing:
For each of the main cities there are two folders, one: /city-name that contains the subpages and folders for the city.
And one: /city-name.html which contains the index.html for the cities main page.
But for Worms there is no folder /worms.html but only /worms.
Nevertheless the Backend Module Web --> Info --> Static HTML Cache says that the main page of Worms has been cached, even if no correct folder has been created on the server.
Could this be a reason for the problem:
For some reason the correct folder for the staticfilecache is not created (or it is deleted later, since after clearing the cache and then revisiting the pages the cache is always created correctly first and everything works fine for several days), but the system "thinks" (according to Web --> Info --> Static HTML Cache) that the correct folder and index.html are (still) there and this results in displaying the wrong page?
Michiel wrote:
Please try the attached version
I will do so, but have one question about it:
Will upgrading result in clearing the cache?
Because if it does I would wait a bit, since after clearing the cache it sometimes takes several days to reproduce the Error. And so we could not check if the strange thing I just saw via ftp and described above could be part of the problem.
Thank you both once more for your will to support me with this problem!
Torsten
Updated by Steffen Gebert about 3 years ago
Torsten Schneider wrote:
...but the system "thinks" (according to Web --> Info --> Static HTML Cache) that the correct folder and index.html are (still) there and this results in displaying the wrong page?
"The system" (a.k.a TYPO3) isn't involved in delivering the static cache file. It's all done by .htaccess magic. So it shouldn't matter that Web->Info displays wrong information (although it seems like it somehow relates with the problem).
I have no experience with Realurl and ".html" suffix and nc_staticfilecache, but I think your cache files are like '/worms.html/index.html', aren't they? When the file doesn't exist the RewriteCond with "-f" fails and TYPO3 should deliver your page.
Could you enable the nc_staticfilecache signature for the cache files? IMHO it's easier to guess, whether the page really comes from cache.
Will upgrading result in clearing the cache?
You should be able to deselect the checkbox during installation.
@Michiel
Do you know installations, where nc_staticfilecache works with .html-suffix or hasn't anybody tried this, yet?
Steffen
Updated by Torsten Schneider about 3 years ago
Hello Steffen,
Could you enable the nc_staticfilecache signature for the cache files?
Didn't find a place to do that, sorry, if I am too blind!
but I found out that there are three versions of what happens:
Case 1: Page is cached --> It is delivered correctly from its place in the nc_staticfilescache folder.
I checked this by downloading several pages from the nc_staticfilescache folder, adding "Static" to the <title> and uploading them again.
Reloading the in the browser shows "Static" in the title.
Example: http://www.dein-rhein-main.de/staedte/mainz/themen/fastnacht/mainzer-rosenmontagszug.html
Case 2: Page is not cached (and Listed as "not hit" in: Web --> Info --> Static HTML Cache): Page is delivered in the unchached, normal Version
Case 3: Page was cached (like "Worms") according to Web --> Info --> Static HTML Cache but folder (in this example /worms.html) is no existend or has been deleted somehow
--> Content of the Home Page is delivered.
I made a little test to confirm this:
http://www.dein-rhein-main.de/staedte/frankfurt/themen/freizeit/sport.html is cached according to Web --> Info --> Static HTML Cache
It worked perfectly and was loaded from then staticfilecache when one visited it.
I the deleted the folder "/tx_ncstaticfilecache/www.dein-rhein-main.de/staedte/frankfurt/themen/freizeit/sport.html
If I now visit the site I get the Homepage's content. So instead of recaching the page to the nc_staticfilecache because it is no more there, the wrong content is delivered.
This brought me to another idea: In the Backend I made some changes to the content of the page (which was loaded from static cache before): http://www.dein-rhein-main.de/staedte/frankfurt/themen/tourismus/uebernachten.html
As normal: When a site is changed, the cache of this site is cleared - and so also the nc_staticfilecache-Folder is removed.
On the next visit to the page usually I should get the uncached version and a new cache should be generated. But this is not what happens: I also do get the content of the Homepage there, now.
So everytime a page, that already has been cached and created in the staticfilecache folder, is changed an the cache of this page is cleared, it delivers the wrong content from then on.
But not only if changes are made to a page. The page "Worms" hasn't been changed for quite some time and still was deleted from static file cache folder without my doing and does show the wrong content now.
I think your cache files are like '/worms.html/index.html', aren't they?
thats right. They usually should be. But as soon as such a file is deleted / cleared / changed from backend (and cache page-cleared cause of that) but still listed at Web --> Info --> Static HTML Cache the wrong content is delivered, as my test mentioned above seems to show.
Torsten
Updated by Torsten Schneider about 3 years ago
Hello Steffen, hello Michiel,
I tried the new version Michiel posted now.
At the moment I was unable to reproduce the error, as described under Case 3 in my last post.
I willy check for some days, if the error maybe still occurs again, but it seems to be resolved.
Thanks a lot for the support of both of you!
Torsten
Updated by Torsten Schneider almost 3 years ago
- Assignee set to Michiel Roos
Hello Steffen, hello Michiel,
bad news :-(
after the problems hadn't occured for some days after I used the version Michiel posted I unfortunately did not check the site for this often enough - but now I noticed that the error mentioned above occurs again on many pages. Not on as many as before, but the procedure is the same:
First only on a view sites and then it goes on to happen on more and more...
Do you have any new ideas for a solution of this problem?
Thank you!
Torsten
Updated by Braulio Solano rojas almost 3 years ago
I have exactly the same problem. Plus I have some strange files. For instance in typo3temp/tx_ncstaticfilecache/solsoft.biz/ the extension created a index.php file.
I did not realized this was happening until visitors to my site told me.
It also happens after some time (after clearing cache it works for some time).
Updated by Ingo Siebeck almost 2 years ago
Perhaps it has something todo with this: http://bugs.typo3.org/bug_view_page.php?bug_id=11761&history=1
I have the same problem, once i call pure index.php the extension generates a static file which is taken for any further requests, because it looks for index.php/index.html in the t3temp/tx_ncstaticfilecache/index.php folder, find it and takes the content from here instead of generating it.
so a small fix which avoids ncstaticfilecache from caching index.php itself, should solve the problem.