[MediaWiki-l] Content Model Problems After Upgrading from MW 1.30.0 to 1.31.0

David Bohman debohman at gmail.com
Sun Jul 1 21:57:31 UTC 2018

I am not certain exactly how it happened. There was no indication in the
recent versions of MW that there was a problem with the database.

What took a bit to figure out is that the problem was with the values in
the revision table. When I looked at the info page for the affected pages,
the content model was valid. The values in the page table in the database
were fine too.

Of course the software cannot catch every bogus value in the database, but
perhaps the diagnostic could be clearer that the revision table is the
source of the difficulty.


On Thu, Jun 21, 2018 at 1:24 AM [[kgh]] <mediawiki at kghoffmeyer.de> wrote:

> Thanks a lot for sharing your solution to the problem. However, this
> sounds like a bug to me that should be fixed.
> I however do not know how you ended up with 0 instead of NULL and if
> this could also have happened to other users of MW using the special
> page in the past to change the content model.
> I understand that some developers are on this list too who can easily at
> least assess if there is an issue. Let's wait for their reply.
> Cheers Karsten
> Am 21.06.2018 um 02:19 schrieb David Bohman:
> > ​I got past the problem. It appears that MW 1.31 is not as permissive
> about
> > the value of rev_content_model in the revision table. ​I had entries in
> the
> > table which were 0, and MW 1.30 did not have a problem with it. However,
> > 1.31 only accepts a value of NULL, otherwise it barfs.
> >
> > Anyhow, I fixed it by forcing the 0 values in the revision table to their
> > default value. The logic seems to be to be to use the content model from
> > the revision if it is set to non-null, otherwise use the value in the
> page
> > table. I suspect that earlier versions of MW accepted a revision content
> > model of 0 as the same as NULL.
> >
> > David Bohman

More information about the MediaWiki-l mailing list