Page MenuHomePhabricator

Thanks logs page id 0
Open, Needs TriagePublic

Description

I just noticed that when I thanked someone for their edit on my own talk page, the value for logging.log_page field was 0, rather than the page ID of my talk page. This is bad behavior; the correct page ID should be logged.

A quick look at the database shows that 0 is in fact the most common page id with log_type = 'thanks' which means a lot of the log_page information logged by thanks is junk.

I think this should be fixed in two parts: (a) the correct page id is always logged, never a 0, and (b) the update script will find the page id for previous thank events and replace 0 with correct id to the best of its ability.

Event Timeline

Legoktm subscribed.

This is intentional, you're not supposed to be able to correlate a thanks log entry with the specific edit that the thank was for.

Reopening. What you just said doesn't answer this issue. For all other pages, except for one's own talk page, the page ID is stored. Why not for one's own talk page?

Note that we are talking "page" ID, not "edit" ID.

I think (I could be wrong, since I'm new to the code.) that logging.log_page is the page ID of the user page for the user being thanked. If that user doesn't have such a page, it's 0.

Yoland10 triaged this task as Medium priority.
Yoland10 set Due Date to Oct 7 2018, 11:00 PM.
Restricted Application changed the subtype of this task from "Task" to "Deadline". · View Herald Transcript
Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptOct 8 2018, 12:50 PM
Aklapper reopened this task as Open.EditedOct 8 2018, 1:55 PM
Aklapper raised the priority of this task from Medium to Needs Triage.

@Yoland10: Please do not resolve tasks when they are not resolved. Resetting priority as this is up to developers who work on resolving this task.

@Aklapper okay... I'm sorry about that i was having problems editing a task

I think (I could be wrong, since I'm new to the code.) that logging.log_page is the page ID of the user page for the user being thanked. If that user doesn't have such a page, it's 0.

I just tested and confirmed you're correct. See also these lines from ApiThank.php's ApiThank::logThanks():

		$target = $recipient->getUserPage();
		$logEntry->setTarget( $target );

So, now the question is, is this the behavior we want, or do we want to change it?

This is intentional, you're not supposed to be able to correlate a thanks log entry with the specific edit that the thank was for.

That's unusual, given MediaWiki's philosophy of transparency about most other actions that are taken.