Steps to reporduce:
- Create a newsletter
- Delete the newsletter
- 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:
- Implement the hook, catch the newsletter which is getting undeleted
- 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