Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/199613
Change subject: Add debug logging to client UpdateRepo code
......................................................................
Add debug logging to client UpdateRepo code
In order to find the root cause behind T92789
Bug: T92789
Change-Id: Ic1945d49510f2f9a61423e337a66e1e2391ea3e2
---
M client/includes/Hooks/UpdateRepoHookHandlers.php
M client/includes/UpdateRepo/UpdateRepo.php
2 files changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/13/199613/1
diff --git a/client/includes/Hooks/UpdateRepoHookHandlers.php
b/client/includes/Hooks/UpdateRepoHookHandlers.php
index ec41526..53dcc5c 100644
--- a/client/includes/Hooks/UpdateRepoHookHandlers.php
+++ b/client/includes/Hooks/UpdateRepoHookHandlers.php
@@ -230,6 +230,7 @@
// show a message to the user that the Wikibase item
needs to be
// manually updated.
wfLogWarning( $e->getMessage() );
+ wfDebugLog( 'UpdateRepo', "OnDelete: Failed to inject
job: " . $e->getMessage() );
}
return true;
@@ -274,6 +275,7 @@
// show a message to the user that the Wikibase item
needs to be
// manually updated.
wfLogWarning( $e->getMessage() );
+ wfDebugLog( 'UpdateRepo', "OnMove: Failed to inject
job: " . $e->getMessage() );
}
return true;
diff --git a/client/includes/UpdateRepo/UpdateRepo.php
b/client/includes/UpdateRepo/UpdateRepo.php
index 89f158b..ea21694 100644
--- a/client/includes/UpdateRepo/UpdateRepo.php
+++ b/client/includes/UpdateRepo/UpdateRepo.php
@@ -91,6 +91,13 @@
$this->title->getFullText()
)
);
+
+ if ( $this->entityId === null ) {
+ wfDebugLog(
+ 'UpdateRepo',
+ "Couldn't find an item for
{$this->title->getFullText()}"
+ );
+ }
}
return $this->entityId;
@@ -106,18 +113,33 @@
if ( !class_exists( 'CentralAuthUser' ) ) {
// We can't do anything without CentralAuth as there's
no way to verify that
// the local user equals the repo one with the same name
+ wfDebugLog(
+ 'UpdateRepo',
+ "Can't validate user " . $this->user->getName()
. ": class CentralAuthUser doesn't exist"
+ );
+
return false;
}
$caUser = CentralAuthUser::getInstance( $this->user );
if ( !$caUser || !$caUser->exists() ) {
// The current user doesn't have a central account
+ wfDebugLog(
+ 'UpdateRepo',
+ "Can't validate user " . $this->user->getName()
. ": User doesn't have a global account"
+ );
+
return false;
}
if ( !$caUser->isAttached() || !$caUser->attachedOn(
$this->repoDB ) ) {
// Either the user account on this wiki or the one on
the repo do not exist
// or they aren't connected
+ wfDebugLog(
+ 'UpdateRepo',
+ "Can't validate user " . $this->user->getName()
. ": User is not attached locally or on {$this->repoDB}"
+ );
+
return false;
}
--
To view, visit https://gerrit.wikimedia.org/r/199613
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1945d49510f2f9a61423e337a66e1e2391ea3e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf22
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits