haskell / haskell-wiki-configuration

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

fix diffs #1

Closed mignon-p closed 5 years ago

mignon-p commented 8 years ago

Currently, diffing two revisions of a page does not work (diff is empty).

mignon-p commented 8 years ago

I've posted a question on StackExchange, but no answer yet.

gbaz commented 8 years ago

There might be something suggestive in the error/web logs when such a case is hit?

On Wed, Nov 2, 2016 at 3:10 PM, Patrick Pelletier notifications@github.com wrote:

I've posted a question https://superuser.com/questions/1141625/mediawiki-extension-wikidiff2-not-working-diffs-are-empty on StackExchange, but no answer yet.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppelleti/haskell-wiki-bugs/issues/1#issuecomment-257968666, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEt2WdLeDKyfUToaOQErnF0GPGUJ38Dks5q6OAngaJpZM4Km59a .

mignon-p commented 8 years ago

Perhaps, but if so, I haven't been able to find the proper log yet. It's not showing up in /var/log/nginx/error.log or /var/log/php5-fpm.log. There isn't anything else that seems promising in /var/log, and if there's a MediaWiki-specific log, I haven't found it yet.

However, there is some promising information at https://www.mediawiki.org/wiki/Manual:How_to_debug about enabling logging, so I will look into that further.

mignon-p commented 8 years ago

I enabled logging by adding:

$wgDebugLogFile = "/var/log/mediawiki/debug.log";

to /etc/mediawiki/LocalSettings.php. I then discovered this in the log file:

wfShellExec: 'wikidiff2' '/home/web/wikidata/upload/tmp/diff_f9tuWC' '/home/web/wikidata/upload/tmp/diff_TsMWXK'
Possibly missing executable file: 'wikidiff2' '/home/web/wikidata/upload/tmp/diff_f9tuWC' '/home/web/wikidata/upload/tmp/diff_TsMWXK'

This suggests that for some reason it is trying to run an executable named wikidiff2, rather than using the wikidiff2 extension. Now I just need to figure out why...

mignon-p commented 8 years ago

This is partially fixed now, but I'm leaving the bug open.

I fixed it by putting:

$wgExternalDiffEngine = false;

in LocalSettings.php. I hadn't tried it before because this is supposed to be the default, and it wasn't being set anywhere in LocalSettings.php. Apparently, it must have been set somewhere else.

Now, we do get diffs, which is much better than before, when we were getting nothing. Now, the diffs look like this:

diffs-without-coloring

However, the diffs look better on Wikipedia, where they are colorized:

diffs-with-coloring

All the necessary information is there in the HTML, so it's just a matter of applying the right styles in the CSS. So, I suspect that the Hawiki theme needs to be modified in order to color the diffs.

I'll also bet the diffs would be colorized in the MonoBook theme, but in trying that out, I ran into #5.

hgolden commented 5 years ago

After upgrading to MediaWiki 1.27.4 LTS, this issue seems to be solved.