Cavendish icon indicating copy to clipboard operation
Cavendish copied to clipboard

( ! ) Fatal error: Class 'MonoBookTemplate' not found in /vagrant/mediawiki/skins/Cavendish/SkinCavendish.php on line 35

Open jdlrobson opened this issue 3 years ago • 4 comments

( ! ) Fatal error: Class 'MonoBookTemplate' not found in /vagrant/mediawiki/skins/Cavendish/SkinCavendish.php on line 35

Note, that class no longer exists so presumably whatever it was using needs to be copied across from 1.36 Skin does not work on latest MediaWiki master.

jdlrobson avatar Jul 30 '21 02:07 jdlrobson

Thanks for reporting this, @jdlrobson!

I'm not sure what's the best way forward here, lazily copy-pasting code from the REL1_35 version of MonoBook does not sound ideal (even though it would allow us to resolve #22)...but anyway, changing class CavendishTemplate extends MonoBookTemplate to class CavendishTemplate extends BaseTemplate in SkinCavendish.php and copying over the following methods from REL1_35 MonoBookTemplate.php makes the skin run without fatals and without requiring MonoBook (hopefully!):

  • getSearchBox
  • getToolboxBox
  • getLanguageBox
  • getBox
  • getPortlet
  • mergeClasses

Note that because this was just a quick experiment, I tested this on a 1.35 box that has MonoBook installed and whatnot; I don't have a 1.36 box nor any plans to actively start supporting 1.36(+) currently (1.35 support for the things I maintain is already taking up a fair amount of time!).

Side note: given that I'm the de facto maintainer of this thing (with a significant amount of commits made since October 2016 being mine), I think it might be worthwhile to have the "should this skin be moved to git/gerrit.wm.o" discussion; after all, Cavendish hasn't quite received the amount of attention and love here on GitHub as it would have on WMF git architecture, I feel.

mary-kate avatar Oct 12 '21 11:10 mary-kate

I think copying over the methods makes a lot of sense. As for < 1.36 support I can test and let you know. https://skins-demo.wmflabs.org/wiki/Special:Version?useskin=cavendish is running latest version, so I'll let you know if I see any other issues with the approach here.

Also copying to Gerrit also makes sense. I can share merge responsibilities with you for example.

jdlrobson avatar Oct 13 '21 03:10 jdlrobson

Would a patch be welcome to fix this up provided it doesn't break 1.35 compatibility?

jdlrobson avatar Dec 20 '21 20:12 jdlrobson

Would a patch be welcome to fix this up provided it doesn't break 1.35 compatibility?

Right, sorry about not replying before, this conversation sadly fell off my radar back in October. Apologies!

Patches are always welcome, of course. :+1: I've finally submitted the import request on MW.org to have this repository imported to the WMF git/gerrit architecture since it appears that the only people actively-ish interested in developing this skin are you and me; it's better to have the "master version" hosted in the same place as most other MW skins, to avoid excess bitrotting and whatnot.

mary-kate avatar Dec 30 '21 21:12 mary-kate