Topic on Skin talk:Vector

Huwmanbeing (talkcontribs)

What is the best way to make a working copy of the current version of Vector that can then be adjusted?

I wanted to try something similar to DarkVector (a skin based on Vector with just some cosmetic adjustments), but when I duplicate the current 1.37 Vector and change out the skin name in the code and file names, it produces internal errors like this:

Class 'AltVector\SkinVersionLookup' not found.
Backtrace: from /var/www/my.wiki/public_html/mediawiki-1.37.2/skins/AltVector/includes/ServiceWiring.php(55)
...

Thanks for any thoughts/suggestions on how best to approach this!

Tacsipacsi (talkcontribs)

The namespace name needs to be changed at three places:

  • In the namespace statements at the top of files. For example, change namespace Vector\ResourceLoader; to namespace AltVector\ResourceLoader;.
  • In skin.json’s AutoloadNamespaces key: "AutoloadNamespaces": {"Vector\\": "includes/"} should be "AutoloadNamespaces": {"AltVector\\": "includes/"}.
  • Wherever it’s used: in skin.json, in use statements, maybe even in comments to avoid confusion.

By the way, you technically need to change anything only if you plan to install both original Vector and your modified version (i.e. if you load both from LocalSettings.php—if the original one just sits in the skins directory but not referenced in any way, there’s no conflict), although it may be useful to do so in order to avoid confusion even if you want to use only the modified one.

Huwmanbeing (talkcontribs)

Thanks for the reply! I do plan to keep the original Vector available alongside the modified version, so I'll check the namespace statements and see if that corrects it. Huwmanbeing (talk) 16:56, 14 May 2022 (UTC)

Reply to "Duplicating Vector"