Page MenuHomePhabricator

Undelete associated talk page does not give same reason as deleting
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

What is the problem?

When deleting an associated talk page via the API (using the deletetalk parameter), the reason that is recorded for the talk page (in Special:Log, RecentChanges, etc.) is:

Deleted together with the associated page with reason: <reason>

This is not the same when undeleting, where Deleted together with the associated page with reason: is not included in the reason.

I guess they should be consistent.

Steps to reproduce problem
  1. https://en.wikipedia.beta.wmflabs.org/wiki/Special:ApiSandbox#action=delete&format=json&title=Selenium_Echo_link_test_0.877682400562503&reason=This%20is%20the%20reason%20for%20the%20delete.&deletetalk=1
  2. Submit
  3. Look in https://en.wikipedia.beta.wmflabs.org/wiki/Special:Log (you will see something like below:)
    delete_reason.png (45×1 px, 36 KB)
  4. https://en.wikipedia.beta.wmflabs.org/wiki/Special:ApiSandbox#action=undelete&format=json&title=Selenium_Echo_link_test_0.877682400562503&reason=This%20is%20the%20reason%20for%20the%20undelete.&undeletetalk=1
  5. Submit
  6. Look in https://en.wikipedia.beta.wmflabs.org/wiki/Special:Log (you will see something like below:)
    undelete_reason.png (52×1 px, 31 KB)

Expected behavior: The undelete reason for the associated talk page is Undeleted/restored together with the associated page with reason: This is the reason for the undelete.
Observed behavior: The undelete reason for the associated talk page is This is the reason for the undelete. (exactly the same as the content page)

Environment

Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.39.0-alpha (6876de7) 06:15, 6 April 2022.

Event Timeline

Change 780973 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/core@master] UndeletePage: Improve reason when restoring assoc talk page

https://gerrit.wikimedia.org/r/780973

Change 780973 merged by jenkins-bot:

[mediawiki/core@master] UndeletePage: Improve reason when restoring assoc talk page

https://gerrit.wikimedia.org/r/780973

When deleting an associated talk page, the reason recorded in the logs is: Deleted together with the associated page with reason: <reason>

When undeleting an associated talk page, the reason is: Restored together with the associated page with reason: <reason>

I only found one bug T306431.

Test environment: https://en.wikipedia.beta.wmflabs.org MediaWiki 1.39.0-alpha (108cd5b) 11:35, 19 April 2022.