Steps to replicate the issue:
Make an action=help API call with toc=1 (e.g. this).
What happens?:
{ "error": { "code": "internal_api_error_TypeError", "info": "[8e4c60be-8654-49b2-b4c7-c63150d49476] Caught exception of type TypeError", "errorclass": "TypeError" }, "servedby": "mw2418" }
What should have happened instead?:
MediaWiki should have returned the HTML content with TOC added.
TypeError: Argument 5 passed to Wikimedia\Parsoid\Core\SectionMetadata::__construct() must be of the type string, bool given, called in /srv/mediawiki/php-1.41.0-wmf.4/vendor/wikimedia/parsoid/src/Core/SectionMetadata.php
Error
- mwversion: 1.41.0-wmf.4
- reqId: 8e4c60be-8654-49b2-b4c7-c63150d49476
- Find reqId in Logstash
[{reqId}] {exception_url} TypeError: Argument 5 passed to Wikimedia\Parsoid\Core\SectionMetadata::__construct() must be of the type string, bool given, called in /srv/mediawiki/php-1.41.0-wmf.4/vendor/wikimedia/parsoid/src/Core/SectionMetadata.php on line 303from /srv/mediawiki/php-1.41.0-wmf.4/vendor/wikimedia/parsoid/src/Core/SectionMetadata.php(157)
#0 /srv/mediawiki/php-1.41.0-wmf.4/vendor/wikimedia/parsoid/src/Core/SectionMetadata.php(303): Wikimedia\Parsoid\Core\SectionMetadata->__construct(integer, integer, string, string, boolean, NULL, NULL, string, string, NULL)
#1 /srv/mediawiki/php-1.41.0-wmf.4/vendor/wikimedia/parsoid/src/Core/TOCData.php(200): Wikimedia\Parsoid\Core\SectionMetadata::fromLegacy(array)
#2 [internal function]: Wikimedia\Parsoid\Core\TOCData::Wikimedia\Parsoid\Core\{closure}(array)
#3 /srv/mediawiki/php-1.41.0-wmf.4/vendor/wikimedia/parsoid/src/Core/TOCData.php(199): array_map(Closure, array)
#4 /srv/mediawiki/php-1.41.0-wmf.4/includes/api/ApiHelp.php(189): Wikimedia\Parsoid\Core\TOCData::fromLegacy(array)
#5 /srv/mediawiki/php-1.41.0-wmf.4/includes/api/ApiHelp.php(77): ApiHelp::getHelp(DerivativeContext, array, array)
#6 /srv/mediawiki/php-1.41.0-wmf.4/includes/api/ApiMain.php(1908): ApiHelp->execute()
#7 /srv/mediawiki/php-1.41.0-wmf.4/includes/api/ApiMain.php(884): ApiMain->executeAction()
#8 /srv/mediawiki/php-1.41.0-wmf.4/includes/api/ApiMain.php(855): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.41.0-wmf.4/api.php(91): ApiMain->execute()
#10 /srv/mediawiki/php-1.41.0-wmf.4/api.php(46): wfApiMain()
#11 /srv/mediawiki/w/api.php(3): require(string)
#12 {main}