Topic on Project:Support desk

(Resolved) "Fatal error: Cannot declare class ResourceLoader" after installing wikibase

10
2A01:CB11:68E:7F00:454A:B870:B529:16D (talkcontribs)

Hello,

I have a small problem since the installation of Wikibase (Mandatory extension for Infobox), I have the following error message which appears "Fatal error: Cannot declare class ResourceLoader, because the name is already in use in E: \ProgramFiles\XAMPP\htdocs\*\includes\resourceloader\ResourceLoader.php on line 60"


Here's what's on line 60 of resourceLoader.php :

class ResourceLoader implements LoggerAwareInterface { /** @var int */ public const CACHE_VERSION = 9; /** @var string JavaScript/CSS pragma to disable minification. * */ public const FILTER_NAME = '/*@name*/';

How does this happen?

I'm on Windows 10, for now my wiki is in Localhost, and I'm on the latest stable version of Mediawiki.

Thanks for your future help.

Bawolff (talkcontribs)

whats the line number of the error? (Includes/ResourceLoader.php is supposed to declare it, the interesting thing is what else is declaring it)


Also how did you install wikibase? Are you sure you actually want wikibase (easier to just modify infoboxes not to use it)

2A01:CB11:68E:7F00:207D:68C6:27BE:1BD1 (talkcontribs)
Bawolff (talkcontribs)

It depends on the infobox. Often its less work to edit them to remove the wikibase dependency.

Anyways, is there more to the error message you posted? Normally it would have some additional info.

EDIT: I was incorrect on this. I thought the error message would include where the class was first defined, but I guess that isn't true.

2A01:CB11:68E:7F00:207D:68C6:27BE:1BD1 (talkcontribs)

Since I am French, I need the infoboxes of the French Wikipedia.


When i try to go to my wiki i only get the message

"E:\ProgramFiles\XAMPP\htdocs\*\includes\resourceloader\ResourceLoader.php on line 60"

Bawolff (talkcontribs)

Hmm. Can you use a search function to try and find what other files have the text "class ResourceLoader" in them?

[The error message basically means there are two, when there should only be one. includes\resourceloader\ResourceLoader.php is the one that is supposed to be there, so the question is, where is the other one]

2A01:CB11:68E:7F00:205A:9EC:A33B:5C31 (talkcontribs)

Do you know how I can check? Should I check everything one by one?

I tried to put the debug to see if it could help me but it does not change anything (I used this link for the debug : Manual:How to debug)

Thank you

Bawolff (talkcontribs)

On linux you would use grep. I dont know enough about windows to suggest an equivalent.

Alternatively, maybe it would be easy to start over and reinstall mediawiki.

2A01:CB11:68E:7F00:E95A:146D:2891:1255 (talkcontribs)

Hello,

I deleted and reinstalled mediawiki.

And I noticed that Wikibase was not mandatory and that on my old wiki I forgot to put TemplateStyle.

My new Wiki works great.

I'm sorry to have wasted your time for nothing, especially after an error on my part.

Thank you, however, for answering me.

Bawolff (talkcontribs)

Note the tutorial you are reading was changed recently to imply that wikibase is less mandatory, so not your fault.

Reply to "(Resolved) "Fatal error: Cannot declare class ResourceLoader" after installing wikibase"