Steps to reproduce:
- use the API sandbox (easiest this way), e.g. on testwiki
- select action=changecontentmodel
- fill in a title, e.g. User:Lucas Werkmeister (WMDE)/sandbox
- select a different model, e.g. text
- let the API sandbox auto-fill the token
- do not fill in a summary
- make request
Error
- mwversion: 1.41.0-wmf.16
- reqId: 6b4064b7-df04-4193-aa03-576aa07339da
- Find reqId in Logstash
[{reqId}] {exception_url} TypeError: Argument 2 passed to ContentModelChange::doContentModelChange() must be of the type string, null given, called in /srv/mediawiki/php-1.41.0-wmf.16/includes/api/ApiChangeContentModel.php on line 82
from /srv/mediawiki/php-1.41.0-wmf.16/includes/content/ContentModelChange.php(251) #0 /srv/mediawiki/php-1.41.0-wmf.16/includes/api/ApiChangeContentModel.php(82): ContentModelChange->doContentModelChange(DerivativeContext, NULL, boolean) #1 /srv/mediawiki/php-1.41.0-wmf.16/includes/api/ApiMain.php(1915): ApiChangeContentModel->execute() #2 /srv/mediawiki/php-1.41.0-wmf.16/includes/api/ApiMain.php(892): ApiMain->executeAction() #3 /srv/mediawiki/php-1.41.0-wmf.16/includes/api/ApiMain.php(863): ApiMain->executeActionWithErrorHandling() #4 /srv/mediawiki/php-1.41.0-wmf.16/api.php(95): ApiMain->execute() #5 /srv/mediawiki/php-1.41.0-wmf.16/api.php(48): wfApiMain() #6 /srv/mediawiki/w/api.php(3): require(string) #7 {main}
Impact
Minor logspam; users can’t change content model without specifying a summary (which is probably discouraged anyways)