Page MenuHomePhabricator

Default deletion log for Wikidata items doesn't include label
Closed, ResolvedPublic


When deleting a regular (wikitext) page, the log for the deletion usually includes at the end the text "content was: " followed by a bit of the page's content. When a Wikidata item is deleted, that text does not include the page's label in any language, making it very difficult to determine what the topic of the item was. If a user sees on their watchlist the text "(Deletion log) Foo has deleted page QXXX (content was: "")", it's very difficult to get any useful information out of that, or followup on it.

Event Timeline

The label could contain information that is a violation of other policies on Wikidata, like privacy violation, harassment and stuff. But I agree that more information would be better.

@Sjoerddebruin The way that's handled for other types of pages is for the deleting admin to manually remove any problematic text from the deletion summary. Seems like that would work here as well.

@Izno This is not the same as either of those, though it does deal with a related issue. The default contents of the log summary box can be changed by the deleting admin, and do not prevent hiding of information. Since there's no issue of the admin being unable to hide certain content, and there aren't substantial technical barriers here, the problems with the other two tasks don't apply.

Side note: there is an idea to use the new CommentStore infrastructure for storing log comments, not just edit summaries. This would allow us to store the label in several languages inside the log comment, to provide localization even after the item itself has been deleted.

As long as we don't have this possibility, it's unclear to me even in what language the label should be preserved for display. Should it be the UI language of the admin that deleted the item? That seems kind of random. Should it be English only? What if there is no English label?...

Pinging @Anomie regarding my comment above.

Yes, CommentStore will be used for log comments too. There's probably not infrastructure in the LogPage or LogEntry classes to actually use it though, so you might have to add that.

The current default log message has three issues:

  1. It only uses the description of the item, not the label (“content was: ""” happens when there was no description). We want either the label and the description, or just the label.
  2. There are no language fallbacks. If the item has no description in the requested language, the “content was” message is empty, even if there was an English description.
  3. The content is based on the deleting user’s language. It should be the wiki’s language, just like the “content was” already is always in English.

Note: Deletions using the action API use the same default log message unless a reason is explicitly specified.

Lydia_Pintscher moved this task from incoming to consider for next sprint on the Wikidata board.

I love this bug, let me take a look

Change 406174 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Wikibase@master] Improve EntityContent::getTextForSummary()

Change 406174 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Improve EntityContent::getTextForSummary()