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

Details

Related Gerrit Patches:
mediawiki/extensions/Newsletter : masterImplement Undeleting a newsletter from the Logs

Related Objects

StatusSubtypeAssignedTask
DuplicateQgil
ResolvedQgil
ResolvedQgil
DeclinedNone
ResolvedAddshore
DuplicateNone
Resolvedori
ResolvedBawolff
ResolvedGlaisher
ResolvedTinaj1234
DeclinedNone
ResolvedGlaisher
Resolved01tonythomas
ResolvedGlaisher
Resolved01tonythomas
OpenNone
OpenDaimona
OpenDaimona
Resolved01tonythomas
ResolvedQgil
ResolvedFilip
ResolvedD3r1ck01
ResolvedNone
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
Resolved01tonythomas
ResolvedMtDu

Event Timeline

01tonythomas removed 01tonythomas as the assignee of this task.Nov 6 2016, 2:39 PM
01tonythomas created this task.
MtDu claimed this task.Nov 8 2016, 11:55 AM

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

Filip added a subscriber: Filip.Dec 15 2016, 7:04 PM

I'll finish it

Filip added a comment.EditedDec 15 2016, 7:50 PM

@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.

Filip added subscribers: TTO, Reedy.Dec 15 2016, 7:51 PM
MtDu added a comment.Dec 15 2016, 8:04 PM

@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!

MtDu added a comment.Dec 15 2016, 8:06 PM

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

MtDu added a comment.Dec 15 2016, 8:07 PM

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

Filip added a comment.Dec 15 2016, 8:19 PM

@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

MtDu closed this task as Resolved.Dec 16 2016, 7:27 PM

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

Qgil awarded a token.Dec 19 2016, 2:04 PM