Last modified: 2007-11-25 18:11:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11558, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9558 - FileCache incorrectly caches multipage image pages
FileCache incorrectly caches multipage image pages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.9.x
PC All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-11 08:41 UTC by Thomas Bleher
Modified: 2007-11-25 18:11 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Thomas Bleher 2007-04-11 08:41:38 UTC
When $wgUseFileCache is enabled, image pages are cached, too. This fails when there are multi-page documents, because  
HTMLFileCache doesn't look at the "page" parameter and serves the same HTML-page for any page in the document.

The most simple fix to this problem is to just not cache Image pages:
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -2473,6 +2473,7 @@ class Article {
                        and ($wgUser->isAnon())
                        and (!$wgUser->getNewtalk())
                        and ($this->mTitle->getNamespace() != NS_SPECIAL )
+                       and ($this->mTitle->getNamespace() != NS_IMAGE )
                        and (empty( $action ) || $action == 'view')
                        and (!isset($oldid))
                        and (!isset($diff))

I'm sure there are better solutions, but this one fixes the problem for me.

Footnote: I'm seeing this problem on a modified system with PDFs enabled, but I'm pretty sure it's the same with DjVu-Files.
Comment 1 Thomas Bleher 2007-11-25 18:11:35 UTC
This bug seems to have fixed itself, at least I cannot reproduce it now using MediaWiki 1.12dev with the PdfHandler extension.
Closing... :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links