haskell / haskell-wiki-configuration

Issue tracking for Haskell Wiki
https://wiki.haskell.org/
4 stars 5 forks source link

Selecting MonoBook theme causes errors, and it's impossible to change back #5

Closed mignon-p closed 5 years ago

mignon-p commented 8 years ago

In your user preferences page, you can choose between two themes: Hawiki and MonoBook. The default is Hawiki.

I tried changing my theme to MonoBook, and I got errors splattered all over my page. Furthermore, although I tried changing back to Hawiki, the change doesn't seem to take effect. So I'm stuck with an unusable wiki account.

monobook-fail

mignon-p commented 8 years ago

There is a nuclear option: "Restore all default settings (in all sections)". That fixed the problem, although now I need to figure out what my settings used to be.

mignon-p commented 8 years ago

No, even the nuclear option didn't quite work. As soon as I started editing my settings, even though I didn't change the theme, it switched me back to MonoBook and now I have errors plastered over everything again.

mignon-p commented 7 years ago

@legoktm, any thoughts on why the MonoBook theme isn't working, why switching to it permanently breaks my account even after I switch back, and how I could unbreak my account? Thanks!

legoktm commented 7 years ago
Original exception: exception 'MWException' with message 'Call to undefined method SkinMonoBook::tooltipAndAccesskey' in /usr/share/mediawiki/includes/Skin.php:1550<br />
Stack trace:<br />
#0 /home/web/wikidata/skin/MonoBook.php(124): Skin-&gt;__call('tooltipAndAcces...', Array)<br />
#1 /home/web/wikidata/skin/MonoBook.php(124): SkinMonoBook-&gt;tooltipAndAccesskey('ca-nstab-main')<br />
#2 /usr/share/mediawiki/includes/SkinTemplate.php(494): MonoBookTemplate-&gt;execute()<br />
#3 /usr/share/mediawiki/includes/OutputPage.php(1982): SkinTemplate-&gt;outputPage()<br />
#4 /usr/share/mediawiki/includes/Wiki.php(406): OutputPage-&gt;output()<br />
#5 /usr/share/mediawiki/includes/Wiki.php(594): MediaWiki-&gt;finalCleanup()<br />
#6 /usr/share/mediawiki/includes/Wiki.php(503): MediaWiki-&gt;main()<br />
#7 /usr/share/mediawiki/index.php(58): MediaWiki-&gt;run()<br />
#8 {main}<br />

Somehow there's a version mismatch between MonoBook and MediaWiki core? I'll have to dig around a bit more.

mignon-p commented 7 years ago

Thanks for pointing me in the right direction!

The skins that came with MediaWiki are in /usr/share/mediawiki/skins, but LocalSettings.php sets $wgStyleDirectory to /home/web/wikidata/skin/, which just contains the Hawiki skin and the MonoBook skin. Presumably it's an old copy of MonoBook, and MediaWiki was upgraded since then. (But we didn't get the upgraded skins, since we're not pointing at them.)

I think this should be an easy fix...

mignon-p commented 7 years ago

Not as easy a fix as I thought. :frowning_face:

I've changed /home/web/wikidata/skin to look like this:

wikiadmin@www:/home/web/wikidata/skin$ ls -l
total 52
lrwxrwxrwx 1 wikiadmin 1004    33 Feb 16 18:45 common -> /usr/share/mediawiki/skins/common
drwxrwsr-x 2 wikiadmin 1004  4096 Nov  6 05:01 hawiki
-rw-rw-r-- 1 wikiadmin 1004   453 Jul 15  2010 Hawiki.deps.php
-rw-rw-r-- 1 wikiadmin 1004 17864 Sep  1 14:09 Hawiki.php
-rw-rw-r-- 1 wikiadmin 1004 16875 Jul 20  2010 Hawiki.php~
lrwxrwxrwx 1 wikiadmin 1004    35 Feb 16 18:42 monobook -> /usr/share/mediawiki/skins/monobook
lrwxrwxrwx 1 wikiadmin 1004    44 Feb 16 18:43 MonoBook.deps.php -> /usr/share/mediawiki/skins/MonoBook.deps.php
lrwxrwxrwx 1 wikiadmin 1004    39 Feb 16 18:43 MonoBook.php -> /usr/share/mediawiki/skins/MonoBook.php
drwxr-sr-x 3 wikiadmin 1004  4096 Feb 16 18:42 old-monobook

which I thought would fix the problem. And it did, in that I'm no longer getting errors. However, there seems to be a missing stylesheet somewhere, because if I switch to MonoBook, it looks... well, it looks the way things look when they don't have a stylesheet.

But at least now I can switch back and forth between skins without my account getting messed up, so I consider it an improvement, albeit an incremental one.

mignon-p commented 7 years ago

I wondered if it might be something about using symlinks, so I got rid of the symlinks and instead I just copied all of /usr/share/mediawiki/skins into /home/web/wikidata/skin.

Unfortunately, MonoBook still looks unstyled.

However, a side effect of copying the whole directory is that now there are a bunch of other skins available, too. Some of them, like "chick", also appear unstyled. But others, like "classic" and "vector", look correct. Not sure what makes some of them work, and others not.

hgolden commented 5 years ago

After updating to MediaWiki 1.27.4 LTS, this issue has been fixed. The new version of the Hawiki skin is based on the Vector skin with minor changes.