Today I came across this page on itwiki which has a peculiar (but not so rare) trait: the content of the page is JavaScript, but its content model is wikitext. Since I'm an interface-admin on itwiki, I expect to be able to edit that page, but if I hit the edit button [1] I see the following error:
You cannot edit this revision because its content model is javascript, which differs from the current content model of the page wikitext.
Reading that, the most natural thing to do seems to change the page's content model to JavaScript. However, if I try to change the content model to JS, I get the following error message:
Your edit was ignored because no change was made to the text.
Now this is confusing, because I wasn't supposed to change anything in the page text, only its content model.
I finally managed to edit the page by changing the content model to plain text (adding a .js to the title) and then switching back to the JavaScript content model. However this is just some sort of a trick and it shouldn't really be that difficult to edit such a page.
UPDATE: Actually, even if I got the error from Special:ChangeContentModel, the model has been changed. See also the logs for this page, for which I had the same problem.
[1] Side note: it really says "Edit source", and not "View source".