| Addshore added a comment. |
In T106136#1946034, @hoo wrote:So I looked into this and found the root cause.
When Wikibase calls EditFilterMergedContent it uses NewItem (or Item:NewItem, depending on the namespace items are in) as title, because we don't have the Item Id at that point (because we don't want to assign Ids we never use, as edits might still fail).
When AbuseFilter chooses to tag an edit it does so by setting AbuseFilter::$tagsToSet[$actionID] = array( /* TAGS */ ); where $actionID is TITLE-USER-edit. In AbuseFilterHooks::onRecentChangeSave that information is then used to save the change tags earlier assigned to that edit. That works by reproducing the above mentioned $actionID from the information present in the recent change entry.
Obviously that doesn't work for the Wikibase changes as the change tags are initially stored with the placeholder title, but the rc entries use the actual title.
So it looks like the title is probably only important for when used with stashedit?
Anyway:
$actionID = implode( '-', [ $title->getPrefixedText(), $recentChange->getAttribute( 'rc_user_text' ), $action ] );
It would be cool if this could ust use a hash of the abusefilter vars? or the text of the change or something like that?
Cc: Lydia_Pintscher, daniel, StudiesWorld, Sjoerddebruin, Bugreporter, aude, hoo, Addshore, Aklapper, Luke081515, matej_suchanek, Nandana, Lahi, Gq86, Daimona, GoranSMilovanovic, QZanden, LawExplorer, Litanwei, _jensen, D3r1ck01, MGChecker, Wong128hk, Nirmos, Wikidata-bugs, Huji, TTO, Jackmcbarn, Mbch331, chasemp
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
