Last modified: 2007-03-22 22:53:01 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 T7142, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5142 - Stable version extension subheading not rendered after saving edit when parser cache used
Stable version extension subheading not rendered after saving edit when parse...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-02 06:49 UTC by netocrat
Modified: 2007-03-22 22:53 UTC (History)
0 users

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


Attachments

Description netocrat 2006-03-02 06:49:56 UTC
The stable version extension uses the ArticleViewHeader hook to display its
subheading.  If the parser cache is in effect, then after saving an edit the
parsed page is cached without this subheading having been rendered.  Subsequent
views will bypass the ArticleViewHeader hook's implementation in the view()
method of Article.php because the earlier call to tryParserCache() will return
true.  This sort of problem is warned about in the comment above the hook. 
Purging the page is the only way I've found for the user to refresh the page so
that the header is shown.

Possible fixes:
a) Add a hook immediately after tryParserCache() in Article::view() that the
extension can direct to the same code as its ArticleViewHeader hook (privately
tested and seems to work OK); disadvantage: very slightly mitigates the
usefulness of caching
b) Add a hook(s) to allow addition of content immediately prior to a save to the
parser cache, either after new saves only - i.e. immediately prior to the
$parserCache->save() call in Article::editUpdates() - or in general - i.e. at
the start of ParserCache::save(); advantage is that caching is not compromised;
disadvantage is that non-primary content may be cached
c) Add a hook(s) somewhere in Skin.php and SkinTemplate.php so that extensions
can arbitrarily append/prepend content to pages based on article/user; same
disadvantage as (a); advantage is general usefulness for extensibility
Comment 1 Fernando Correia 2006-12-12 12:22:38 UTC
In my opinion, option "c" would be very useful for personalization and access
control.
Comment 2 Manuel Schneider 2007-03-22 09:06:08 UTC
this did the trick for me as I'm also using the same hook:

r1=20525&r2=20612">http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Article.php?r1=20525&r2=20612
Comment 3 netocrat 2007-03-22 22:53:01 UTC
Yes, that seems to work.  It's a variation of option (a).  I'm closing this bug
as fixed.

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


Navigation
Links