Last modified: 2010-05-15 15:32:56 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 T2734, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 734 - changes to included pages don't flush cache for templates not in Template: namespace
changes to included pages don't flush cache for templates not in Template: na...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.4.x
All All
: High normal with 4 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://meta.wikipedia.org/Sandbox/Var...
:
: 572 (view as bug list)
Depends on: 1065
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-17 08:50 UTC by T. Gries
Modified: 2010-05-15 15:32 UTC (History)
4 users (show)

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


Attachments

Description T. Gries 2004-10-17 08:50:55 UTC
I often use templates which resides in (which are) normal namespace pages; you
can refer to these by using {{:pagename}} , whereas {{pagename}} would refer to
a page Template:pagename . This allows users without Sysop rights to make use of
other normal pages, e.g. for adding navigation bars, without the need to edit a
Template:page .

Problem:
I noticed, that changes on the referred page :pagename (the one which should be
shown on the parant page) are not rendered - even after a full browser refresh,
which makes me think., that a mediawiki cache problem exists here.

Example in meta.wiki:

Content of parent page http://meta.wikipedia.org/Sandbox/Variablesubstitutionfails:

{{:Sandbox/Variablesubstitutionfails1}}
text body


Now change this http://meta.wikipedia.org/Sandbox/Variablesubstitutionfails1 and
realize, that the change will not be reflected while the wiki renders the parent
page. However, if you actually EDIT (or SHOW EDIT) the parent page, you will see
the changes in the Variablesubstitutionfails1 page.
Comment 1 Wil Mahan 2004-10-18 06:36:01 UTC
What's supposed to happen is this: when a page includes a template,
a link from the page to the template is added to the links table.
Thus when the template is changed, the including article should be
touched to invalidate all cached copies.

However, Article.php only does this invalidation for pages in the
template namespace.
Comment 2 T. Gries 2004-10-18 06:41:19 UTC
(In reply to comment #1)
> What's supposed to happen is this: when a page includes a template,
> a link from the page to the template is added to the links table.
> Thus when the template is changed, the including article should be
> touched to invalidate all cached copies.
> 
> However, Article.php only does this invalidation for pages in the
> template namespace.
> 

Wil, 

at the moment, I am unexperienced with the whole cache concept but understand
what you mean. 

Could you find or tell me what exactly to patch, so that every dependent page is
"touched" if an arbitrary page changes, which another one depends of ?

Comment 3 Wil Mahan 2004-10-20 19:08:15 UTC
(In reply to comment #2)
> 
> at the moment, I am unexperienced with the whole cache concept but understand
> what you mean. 
> 
> Could you find or tell me what exactly to patch, so that every dependent page is
> "touched" if an arbitrary page changes, which another one depends of ?

I'm referring to this code in Article.php (both in 1.3 and HEAD):

# Template namespace
# Purge all articles linking here
if ( $this->mTitle->getNamespace() == NS_TEMPLATE) {
    $titles = $this->mTitle->getLinksTo();
    Title::touchArray( $titles );
...

Not doing the check for NS_TEMPLATE would fix this problem, but
it's not a good general solution because it would be bad for
performance.

A better long-term solution might be to use a separate table
to represent template inclusions, rather than using the
links table for this purpose
Comment 4 Rowan Collins [IMSoP] 2004-11-24 16:52:19 UTC
[attempt at better summary]

I agree that {trans|in}clusions should be stored in a 'templatelinks' table, not
the general 'links' one; this would not only allow cache purging to be done for
pages with inclusions in *any* namespace, but it would mean we could have a
Special:Whattranscludesthis for templates, distinct from Special:Whatlinkshere.
It would also make other template issues easier to deal with, like the
template-within-a-template caching issue, bug 734, and maybe even bug 572.
Comment 5 Wikipedia:en:User:Paddu 2004-11-28 20:53:19 UTC
What is the "template-within-a-template caching issue" bug no.? If that bug is
not filed yet, IMHO that should be filed. (Couldn't locate the bug through
mediazilla search.)
Comment 6 Rowan Collins [IMSoP] 2004-12-02 23:03:49 UTC
(In reply to comment #5)
> What is the "template-within-a-template caching issue" bug no.? 

I couldn't find an entry for it either, so I've filed it as bug 983.
Comment 7 Rowan Collins [IMSoP] 2005-04-24 16:51:53 UTC
*** Bug 572 has been marked as a duplicate of this bug. ***
Comment 8 Brion Vibber 2006-01-21 04:01:17 UTC
This ought to have been fixed in 1.6 with the new templatelinks table. 
Can you confirm?
Comment 9 Tim Starling 2006-02-25 00:13:28 UTC
Fixed in CVS for 1.6 release. All templates loaded during wikitext parsing will be registered in 
the templatelinks table, so there is no issue with templates included from other templates. This 
behaviour might be counterintuitive for Special:Whatlinkshere, that fact can be reported as a 
separate issue if anyone cares.

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


Navigation
Links