Page MenuHomePhabricator

MWException raised when the ContentModel of a page is changed to NewsletterContent
Closed, ResolvedPublic

Description

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.

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
ResolvedPppery

Event Timeline

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.

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 ?

Change 329815 had a related patch set uploaded (by Pppery):
Introduce stricter validation involving Newsletters' content models

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

... and you said it could not be fixed ...

Change 329815 merged by jenkins-bot:
Introduce stricter validation involving Newsletters' content models

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

01tonythomas assigned this task to Pppery.