Lucas_Werkmeister_WMDE added a comment.
I think there’s one more condition in `onRecentChange_save()` that filters
out the deletion – if I disable that, then most of my API integration tests
(see Gerrit change above) actually work:
diff --git a/repo/includes/Hooks/RecentChangeSaveHookHandler.php
b/repo/includes/Hooks/RecentChangeSaveHookHandler.php
index aba78cad15..a86e3a69b3 100644
--- a/repo/includes/Hooks/RecentChangeSaveHookHandler.php
+++ b/repo/includes/Hooks/RecentChangeSaveHookHandler.php
@@ -66,22 +66,33 @@ public static function factory(
public function onRecentChange_save( RecentChange $recentChange ):
void {
$logType = $recentChange->getAttribute( 'rc_log_type' );
$logAction = $recentChange->getAttribute( 'rc_log_action' );
if ( $recentChange->getAttribute( 'rc_this_oldid' ) <= 0 ) {
// If we don't have a revision ID, we have no chance to find
the right change to update.
// NOTE: As of February 2015, RC entries for undeletion have
rc_this_oldid = 0.
- return;
+ // return;
}
- if ( $logType === null || ( $logType === 'delete' && $logAction
=== 'restore' ) ) {
+ if ( $logType === null || ( $logType === 'delete' && ( $logAction
=== 'restore' || $logAction === 'delete' ) ) ) { // TODO delete_redir?
foreach ( $this->changeHolder->getChanges() as $change ) {
$this->handleChange( $change, $recentChange );
}
}
}
Specifically, the tests for “no more sitelink usage” and “no more
`wikibase_item` page prop” pass, but the test for “external recent change for
item deletion” only passed once (right after I made that change) but has been
failing again ever since, frustratingly. Also, that `return` is probably there
for a reason… needs more investigation. (Also with what Adam wrote above.)
TASK DETAIL
https://phabricator.wikimedia.org/T326082
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, ItamarWMDE, Michael, Lydia_Pintscher, WMDE-leszek,
Jon.b.amar, Addshore, Aklapper, Adamm71, Jersione, Hellket777, LisafBia6531,
Astuthiodit_1, Susie413113, 786, Biggs657, karapayneWMDE, Invadibot,
maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696,
darthmon_wmde, Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci,
Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, Jayprakash12345,
QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Neuronton,
Scott_WUaS, Wong128hk, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]