Last modified: 2014-09-24 00:06:47 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 T25305, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23305 - Title::invalidateCache() doesn't work when called within the same second as Article::doEdit()
Title::invalidateCache() doesn't work when called within the same second as A...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.16.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-23 22:52 UTC by Lee Worden
Modified: 2014-09-24 00:06 UTC (History)
0 users

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


Attachments
patch for ParserOutput.php (618 bytes, patch)
2010-04-23 22:52 UTC, Lee Worden
Details

Description Lee Worden 2010-04-23 22:52:55 UTC
Created attachment 7327 [details]
patch for ParserOutput.php

To edit several pages and have them all be parsed the next time they are viewed, an extension can save the edits with $article->doEdit() (with some expensive operations disabled), then expire the affected pages from the parser cache using $title->invalidateCache() afterward.  Unfortunately, this doesn't work if doEdit() and invalidateCache() are called in the same second.

The attached patch fixes this problem by changing a < to <= in ParserOutput.php.  However, this introduces a possible bug opposite to the existing one, in that calling invalidateCache() just BEFORE doEdit() can cause the page to be reparsed unnecessarily.  It could also cause other problems, of course...
Comment 1 Lee Worden 2010-04-27 01:24:13 UTC
ok, you don't want to do it like that, because every time you edit a page, it parses during the submit operation, then redirects you to the page and parses it again.
Comment 2 p858snake 2011-04-30 00:10:03 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 3 Sumana Harihareswara 2011-11-10 00:01:17 UTC
Lee, I'm adding the "reviewed" keyword here because it seems you have reviewed your own patch! :-) If you'd like to talk about how to change your approach and revise your patch, please come to #mediawiki on freenode and talk with other developers about the issue.  Thanks for the patch!

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


Navigation
Links