Steps to replicate the issue (include links if applicable):
- Presently running MW 1.41.1
What happens?:
Unable to use VisualEditor as I keep on getting this error:
MediaWiki\Parser\Parsoid\Config\SiteConfig::namespaceId(): Argument #1 ($name) must be of type string, int given, called in /w/vendor/wikimedia/parsoid/src/Config/SiteConfig.php on line 505
This relates to this bit of code:
/**
* Interwiki link data, after removing items that conflict with namespace names.
* (In case of such conflict, namespace wins, interwiki is ignored.)
* @return array[] See interwikiMap()
*/
public function interwikiMapNoNamespaces(): array {
if ( $this->interwikiMapNoNamespaces === null ) {
$map = $this->interwikiMap();
foreach ( array_keys( $map ) as $key ) {
if ( $this->namespaceId( $key ) !== null ) {
unset( $map[$key] );
}
}
$this->interwikiMapNoNamespaces = $map;
}
return $this->interwikiMapNoNamespaces;
}What should have happened instead?:
Should be allowed to edit.
I could edit on some pages if I comment out this bit of code:
/* foreach ( array_keys( $map ) as $key ) {
if ( $this->namespaceId( $key ) !== null ) {
unset( $map[$key] );
}
}*/I did this before upgrading from 1.40.1 as well, and that worked fine. But I figure there have been code changes since then.