Steps to replicate the issue (include links if applicable):
- figure out a content model that has no pages on your wiki yet (for example, MediaWiki:Test.vue if your content_models table doesn't have vue yet)
- create a page with that content model
What happens?:
- MediaWiki\Storage\NameTableAccessException: No insert possible but primary DB didn't give us a record for '*' in 'content_models'
- page is not created
- no changes are made to the content_models table
What should have happened instead?:
- no exception
- page is created
- a row is added to the content_models table
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
- only happens in production so far. haven't been able to repro in localhost yet. maybe we're missing a step to reproduce.
- have seen it on 3 different production wikis: T399372, T401641, T408488
- workaround is to have a deployment person run the SQL query manually
- T399633: Fix AUTO_INCREMENT values for the content_models table seemed related initially, but DBAs investigated and do not think that is the root cause