If a page (in any content model) consisting of valid JSON representing a Newsletter, but the title does not match the name of an existing newsletter, and you try to change the content model of that page to NewsletterContent (using Special:ChangeContentModel), an MWException saying "Cannot find newsletter with name NEWSLETTER_NAME" is thrown, which appears as an internal error.
|mediawiki/extensions/Newsletter : master||Introduce stricter validation involving Newsletters' content models|
Well, we cannot fix this (other than maybe showing a better error message, or even stopping the transacation from happening). Can you check if the page got moved succesfully, like your FooChangedModelPage is accessible, even though it shows this exception ? If it is, then we might be able to implement some hook to stop this thing from happening.
I think you are confusing my two tasks here. This one is about content models, and the content model change does not happen after this error, and the page is still viewable normally in its previous content model.
Right, in that case no changes were committed and its a \m/ situation. I think we can close this one safely then ? If no changes are commited to the db,and a proper exception is thrown - that is the best we can do, I guess ? Thoughts ?