Page MenuHomePhabricator

FileCache incorrectly caches multipage image pages
Closed, ResolvedPublic

Description

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.


Version: 1.9.x
Severity: normal
Platform: PC

Details

Reference
bz9558

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:36 PM
bzimport set Reference to bz9558.
bzimport added a subscriber: Unknown Object (MLST).

This bug seems to have fixed itself, at least I cannot reproduce it now using MediaWiki 1.12dev with the PdfHandler extension.
Closing... :)