Last modified: 2008-03-22 11:52:57 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 T9050, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7050 - OutputPageBeforeHTML hook is not executed for preview
OutputPageBeforeHTML hook is not executed for preview
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.8.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://meta.wikimedia.org/wiki/UserMagic
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-18 01:36 UTC by Ross M
Modified: 2008-03-22 11:52 UTC (History)
2 users (show)

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


Attachments

Description Ross M 2006-08-18 01:36:10 UTC
As described in the 1.6 release notes, the OutputPageBeforeHTML hook was
designed "to postprocess article HTML on page view (comes after parser cache, if
used)."  It therefore seemed ideal for the design of extensions that produce
rapidly-changing output, since producing it at this late stage would not affect
the page cache.  However, according to Brion Vibber, this hook is not triggered
when loading Squid-cached content
([http://uncyclopedia.org/wiki/Forum:Getting_the_current_user's_username#Alternative],
[http://meta.wikimedia.org/wiki/Talk:UserMagic]).  Additionally, the hook is not
triggered when viewing a page in Preview mode
[http://www.undefined.net/w/index.php?title=Test].  These limitations severely
hamper the usefulness of this hook in extension writing, and should be removed.
Comment 1 Jim R. Wilson 2007-02-14 17:30:58 UTC
> These limitations severely hamper the usefulness of this hook in extension
writing, and should be removed.

Please don't.  OutputPageBeforeHTML offers one of the only ways an extension
developer can inject raw HTML into a page uninhibited by the Parser as of
versions 1.6.9, 1.8.3 and 1.9.2.  
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-02-15 01:26:01 UTC
(In reply to comment #0)
> However, according to Brion Vibber, this hook is not triggered
> when loading Squid-cached content
>
([http://uncyclopedia.org/wiki/Forum:Getting_the_current_user's_username#Alternative],
> [http://meta.wikimedia.org/wiki/Talk:UserMagic]).

INVALID.  Squid is written in C and could not possibly execute PHP hooks.  Cache
hits won't touch MediaWiki at all.  If Squid has a hook architecture, you can
use that to write extensions for it, otherwise you have to ask them to add the
hooks.  We don't control Squid.

> Additionally, the hook is not
> triggered when viewing a page in Preview mode
> [http://www.undefined.net/w/index.php?title=Test].

That's something we can fix (if it's still true).

(In reply to comment #1)
> > These limitations severely hamper the usefulness of this hook in extension
> writing, and should be removed.
> 
> Please don't.  OutputPageBeforeHTML offers one of the only ways an extension
> developer can inject raw HTML into a page uninhibited by the Parser as of
> versions 1.6.9, 1.8.3 and 1.9.2.  

The suggestion was to apply the hook in more places (i.e., remove restrictions
on when the hook is run), not to remove it.
Comment 3 Aaron Schulz 2007-08-31 08:57:48 UTC
Done in r25341.

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


Navigation
Links