[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do an HTMLCacheUpdate of templatelinks on page creation

2017-04-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348763 )

Change subject: Do an HTMLCacheUpdate of templatelinks on page creation
..


Do an HTMLCacheUpdate of templatelinks on page creation

When a page is created, anything that's trying to transclude that page
needs to have an HTMLCacheUpdate run on it. But that's not currently
happening.

Normal template transclusion happens to get updates only because
transclusion of a nonexistent template is rendered as a link to that
template, which registers a pagelink, and pagelinks *are* being updated
on page creation to cause redlinks to turn blue.

Change-Id: I18b8cfdeedc53f8fdb1e758a6fca1cd23d9574f8
---
M includes/page/WikiPage.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 82c32da..a687900 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -3252,6 +3252,9 @@
 

MediaWikiServices::getInstance()->getLinkCache()->invalidateTitle( $title );
 
+   // Invalidate caches of articles which include this page
+   DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 
'templatelinks' ) );
+
if ( $title->getNamespace() == NS_CATEGORY ) {
// Load the Category object, which will schedule a job 
to create
// the category table row if necessary. Checking a 
replica DB is ok

-- 
To view, visit https://gerrit.wikimedia.org/r/348763
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I18b8cfdeedc53f8fdb1e758a6fca1cd23d9574f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do an HTMLCacheUpdate of templatelinks on page creation

2017-04-18 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348763 )

Change subject: Do an HTMLCacheUpdate of templatelinks on page creation
..

Do an HTMLCacheUpdate of templatelinks on page creation

When a page is created, anything that's trying to transclude that page
needs to have an HTMLCacheUpdate run on it. But that's not currently
happening.

Normal template transclusion happens to get updates only because
transclusion of a nonexistent template is rendered as a link to that
template, which registers a pagelink, and pagelinks *are* being updated
on page creation to cause redlinks to turn blue.

Change-Id: I18b8cfdeedc53f8fdb1e758a6fca1cd23d9574f8
---
M includes/page/WikiPage.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/348763/1

diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 82c32da..a687900 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -3252,6 +3252,9 @@
 

MediaWikiServices::getInstance()->getLinkCache()->invalidateTitle( $title );
 
+   // Invalidate caches of articles which include this page
+   DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 
'templatelinks' ) );
+
if ( $title->getNamespace() == NS_CATEGORY ) {
// Load the Category object, which will schedule a job 
to create
// the category table row if necessary. Checking a 
replica DB is ok

-- 
To view, visit https://gerrit.wikimedia.org/r/348763
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18b8cfdeedc53f8fdb1e758a6fca1cd23d9574f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits