Last modified: 2007-03-22 22:53:01 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
In my opinion, option "c" would be very useful for personalization and access control.
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
Yes, that seems to work. It's a variation of option (a). I'm closing this bug as fixed.