Last modified: 2008-03-22 11:52:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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