Jump to content

Topic on Manual talk:Extension registration/Flow

Uncaught Exception - Array to string conversion

4
Summary by Berot3

spelling mistake! a missing "s" at the end: for arrays it should be wfLoadSkins instead of wfLoadSkin

Berot3 (talkcontribs)

On mediawiki 1.35.2 I get a error when trying to use following setting:

wfLoadSkin([ 'MonoBook', 'Timeless', 'Vector' ]);

error:

Notice: Array to string conversion in C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\includes\GlobalFunctions.php on line 86

Fatal error: Uncaught Exception: Unable to open file C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs/skins/Array/skin.json: filemtime(): stat failed for C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs/skins/Array/skin.json in C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\includes\registration\ExtensionRegistry.php:177 Stack trace: #0 C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\includes\GlobalFunctions.php(88): ExtensionRegistry->queue('C:\\Bitnami\\medi...') #1 C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\LocalSettings.php(192): wfLoadSkin(Array) #2 C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\includes\Setup.php(143): require_once('C:\\Bitnami\\medi...') #3 C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\includes\WebStart.php(89): require_once('C:\\Bitnami\\medi...') #4 C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\index.php(44): require('C:\\Bitnami\\medi...') #5 {main} thrown in C:\Bitnami\mediawiki-1.35.2-0\apps\mediawiki\htdocs\includes\registration\ExtensionRegistry.php on line 177
Berot3 (talkcontribs)

loading every skin one by one works as usual

also: it works for extensions, like:

wfLoadExtensions([
	'CategoryTree',
	'Cite',
	'CiteThisPage',
	'CodeEditor',
	'ConfirmEdit',
	'Gadgets',
	'ImageMap',
	'InputBox',
	'Interwiki',
	'LocalisationUpdate',
	'MultimediaViewer',
	'Nuke',
	'OATHAuth',
	'PageImages',
	'ParserFunctions',
	'PdfHandler',
	'Poem',
	'Renameuser',
	'ReplaceText',
	'Scribunto',
	'SecureLinkFixer',
	'SpamBlacklist',
	'SyntaxHighlight_GeSHi',
	'TemplateData',
	'TextExtracts',
	'TitleBlacklist',
	'WikiEditor',
	'VisualEditor',
]);
Mainframe98 (talkcontribs)

You should use wfLoadSkins.

Berot3 (talkcontribs)

well thanks a lot. that is embarrassing :D

I will double-down on my copy-pasting-skills, I promise! ;)