More languages
More actions
Hooks.php warning
Warning: Array to string conversion in /var/www/prolewiki/extensions/VisualEditor/includes/Hooks.php on line 889
Hooks.php stacktrace
string(1548) "#0 /var/www/prolewiki/includes/HookContainer/HookContainer.php(161): MediaWiki\Extension\VisualEditor\Hooks->onSkinEditSectionLinks() #1 /var/www/prolewiki/includes/HookContainer/HookRunner.php(3547): MediaWiki\HookContainer\HookContainer->run() #2 /var/www/prolewiki/includes/skins/Skin.php(1921): MediaWiki\HookContainer\HookRunner->onSkinEditSectionLinks() #3 /var/www/prolewiki/includes/parser/ParserOutput.php(494): Skin->doEditSectionLink() #4 [internal function]: ParserOutput->{closure}() #5 /var/www/prolewiki/includes/parser/ParserOutput.php(473): preg_replace_callback() #6 /var/www/prolewiki/includes/Output/OutputPage.php(2341): ParserOutput->getText() #7 /var/www/prolewiki/includes/Output/OutputPage.php(2354): MediaWiki\Output\OutputPage->addParserOutputText() #8 /var/www/prolewiki/includes/page/Article.php(831): MediaWiki\Output\OutputPage->addParserOutput() #9 /var/www/prolewiki/includes/page/Article.php(654): Article->doOutputFromParserCache() #10 /var/www/prolewiki/includes/page/Article.php(550): Article->generateContentOutput() #11 /var/www/prolewiki/includes/actions/ViewAction.php(78): Article->view() #12 /var/www/prolewiki/includes/MediaWiki.php(583): ViewAction->show() #13 /var/www/prolewiki/includes/MediaWiki.php(363): MediaWiki->performAction() #14 /var/www/prolewiki/includes/MediaWiki.php(960): MediaWiki->performRequest() #15 /var/www/prolewiki/includes/MediaWiki.php(613): MediaWiki->main() #16 /var/www/prolewiki/index.php(50): MediaWiki->run() #17 /var/www/prolewiki/index.php(46): wfIndexMain() #18 {main}"
Wikibase PHP errors
Backtrace
Wikibase\Lib\LanguageNameLookup::getName(): Argument #1 ($languageCode) must be of type string, null given, called in /var/www/prolewiki/extensions/Wikibase/view/src/SiteLinksView.php on line 301 from /var/www/prolewiki/extensions/Wikibase/lib/includes/LanguageNameLookup.php(40) #0 /var/www/prolewiki/extensions/Wikibase/view/src/SiteLinksView.php(301): Wikibase\Lib\LanguageNameLookup->getName() #1 /var/www/prolewiki/extensions/Wikibase/view/src/SiteLinksView.php(268): Wikibase\View\SiteLinksView->getHtmlForSiteLink() #2 /var/www/prolewiki/extensions/Wikibase/view/src/SiteLinksView.php(182): Wikibase\View\SiteLinksView->getHtmlForSiteLinks() #3 /var/www/prolewiki/extensions/Wikibase/view/src/SiteLinksView.php(120): Wikibase\View\SiteLinksView->getHtmlForSiteLinkGroup()
Further context
extensions/Wikibase/lib/includes/LanguageNameLookup.php (40)
public function getName( string $languageCode ): string {
$languageCode = $this->normalize( $languageCode );
$name = $this->languageNameUtils->getLanguageName( $languageCode, $this->inLanguage );
if ( $name === '' ) {
return $languageCode;
}
return $name;
}
extensions/Wikibase/view/src/SiteLinksView.php (301)
private function getHtmlForSiteLink( array $siteLinkForTable, $isSpecialGroup ) {
/** @var Site $site */
$site = $siteLinkForTable['site'];
/** @var SiteLink $siteLink */
$siteLink = $siteLinkForTable['siteLink'];
if ( $site->getDomain() === '' ) {
return $this->getHtmlForUnknownSiteLink( $siteLink );
}
$languageCode = $site->getLanguageCode();
$siteId = $siteLink->getSiteId();
// FIXME: this is a quickfix to allow a custom site-name for the site groups which are
// special according to the specialSiteLinkGroups setting
if ( $isSpecialGroup ) {
$siteNameMsg = 'wikibase-sitelinks-sitename-' . $siteId;
$siteName = $this->textProvider->has( $siteNameMsg ) ? $this->textProvider->get( $siteNameMsg ) : $siteId;
} else {
// TODO: get an actual site name rather then just the language
$siteName = $this->languageNameLookup->getName( $languageCode ); // is giving null arguments
}
return $this->templateFactory->render( 'wikibase-sitelinkview',
htmlspecialchars( $siteId ), // ID used in classes
htmlspecialchars( $siteId ), // displayed site ID
htmlspecialchars( $siteName ),
$this->getHtmlForPage( $siteLink, $site )
);
}
extensions/Wikibase/view/src/SiteLinksView.php (268)
private function getHtmlForSiteLinks( array $siteLinksForTable, $isSpecialGroup ) {
$html = '';
foreach ( $siteLinksForTable as $siteLinkForTable ) {
$html .= $this->getHtmlForSiteLink( $siteLinkForTable, $isSpecialGroup );
}
return $html;
}
extensions/Wikibase/view/src/SiteLinksView.php (182)
private function getHtmlForSiteLinkGroup( array $siteLinks, ?ItemId $itemId, $group ) {
$siteLinksForTable = $this->getSiteLinksForTable(
$this->getSitesForGroup( $group ),
$siteLinks
);
$count = count( $siteLinksForTable );
return $this->templateFactory->render(
'wikibase-sitelinkgroupview',
// TODO: support entity-id as prefix for element IDs.
htmlspecialchars( 'sitelinks-' . $group, ENT_QUOTES ),
$this->textProvider->getEscaped( 'wikibase-sitelinks-' . $group ),
$this->textProvider->getEscaped( 'parentheses', [
$this->textProvider->get(
'wikibase-sitelinks-counter',
[
$this->numberLocalizer->localizeNumber( $count ),
]
),
] ),
$this->templateFactory->render(
'wikibase-sitelinklistview',
$this->getHtmlForSiteLinks( $siteLinksForTable, $group === 'special' )
),
htmlspecialchars( $group ),
$this->sectionEditLinkGenerator->getSiteLinksEditSection( $itemId ),
$count > 1 ? ' mw-collapsible' : ''
);
}
extensions/Wikibase/view/src/SiteLinksView.php (120)
public function getHtml( array $siteLinks, ?ItemId $itemId, array $groups ) {
$html = '';
if ( empty( $groups ) ) {
return $html;
}
foreach ( $groups as $group ) {
$html .= $this->getHtmlForSiteLinkGroup( $siteLinks, $itemId, $group );
}
$html = $this->templateFactory->render( 'wikibase-sitelinkgrouplistview',
$this->templateFactory->render( 'wikibase-listview', $html )
);
$sectionHeading = $this->getHtmlForSectionHeading( 'wikibase-sitelinks' );
return $sectionHeading . $html;
}