Page MenuHomePhabricator

Implement Undeleting a newsletter from the Logs
Closed, ResolvedPublic

Description

Steps to reporduce:

  1. Create a newsletter
  2. Delete the newsletter
  3. Try undeleting/restoring it from Special:Undelete or the logs. You would have a URL which ends up like title=Special:Undelete&action=submit

How to fix:
A minor implmentation is there in https://gerrit.wikimedia.org/r/#/c/295670/27/extension.json.

You would want to:

  1. Implement the hook, catch the newsletter which is getting undeleted
  2. set the inactive flag to active in nl_newsletters. You will need a new function in NewsletterDb, which looks something like deleteNewsletter, but doing the opposite.

Currently it just shows up a 404:
Fatal error: Call to a member function getName() on null in /var/www/core/core/extensions/Newsletter/includes/content/NewsletterContent.php on line 143

Related Objects

StatusSubtypeAssignedTask
DuplicateQgil
ResolvedQgil
ResolvedQgil
DeclinedNone
ResolvedAddshore
DuplicateNone
Resolvedori
ResolvedBawolff
ResolvedGlaisher
ResolvedTinaj1234
DeclinedNone
ResolvedGlaisher
Resolved01tonythomas
ResolvedGlaisher
Resolved01tonythomas
ResolvedPppery
ResolvedDaimona
ResolvedDaimona
Resolved01tonythomas
ResolvedQgil
ResolvedFilip
ResolvedxSavitar
ResolvedNone
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
ResolvedMtDu

Event Timeline

I will try my best. Will push a patch for [WIP] Review soon. :)

Change 320370 had a related patch set uploaded (by MtDu):
[WIP] Implement Undeleting a newsletter from the Logs

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

@MtDu is working on it, so probably not worth for a GCI anymore

@01tonythomas @Reedy @TTO Newsletter log messages are not showing as Deletion Logs. I cant just change type from "newsletter" "newsletter-removed" to "delete" "delete". Seems like code was totally not tested, as i can't test undeletion becouse of it.

@FilipGCI
I haven't finished it. I've had exams, so I haven't had time to. I have a working patch, just haven't pushed it. Please let me finish. :)
Thanks!

Note: [WIP] tag means the code is not finished. @FilipGCI

Thanks for reminding me that it needs to be done though! :) @FilipGCI

@MtDu - Its GCI task, but i can abandon it for you, contact with me on IRC

Change 320370 merged by jenkins-bot:
Implement Undeleting a newsletter from the Logs

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

Patchset has been merged. Thus closing as resolved.
Thanks!