Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339024 )

Change subject: Use LinksUpdate member for page_id
......................................................................

Use LinksUpdate member for page_id

The onLinksUpdateComplete hook is run asyncronously
by the JobQueue, so the article might've been deleted
by the time the hook was run. In that case Title->getArticleID()
might return zero which is not conforming to our event schema.

The mId field, however, should still be correct since it's filled
when the LinksUpdate object is created.

Bug: T158702
Change-Id: Ib32f837937c0c11df60a996ea4d72cf81461906c
---
M EventBus.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventBus 
refs/changes/24/339024/1

diff --git a/EventBus.hooks.php b/EventBus.hooks.php
index 1da90e3..8c9f865 100644
--- a/EventBus.hooks.php
+++ b/EventBus.hooks.php
@@ -569,7 +569,7 @@
                        'database'           => $wgDBname,
 
                        // page entity fields
-                       'page_id'            => $title->getArticleID(),
+                       'page_id'            => $linksUpdate->mId,
                        'page_title'         => $title->getPrefixedDBkey(),
                        'page_namespace'     => $title->getNamespace(),
                        'page_is_redirect'   => $title->isRedirect(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib32f837937c0c11df60a996ea4d72cf81461906c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <ppche...@wikimedia.org>

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

Reply via email to