Last modified: 2011-04-04 21:28:27 UTC
I've been seeing sporadic occurrences of a strange bug: on submitting an edit, the entire article body is truncated. I think I've finally figured out what is causing this. This seems to happen when there's an editing conflict, and diff3 is invoked. There's no errors in the PHP log, but I see this in the Apache error log: diff: illegal option -- a usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2 diff [-bitw] [-C number] file1 file2 diff [-bitw] [-D string] file1 file2 diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 directory2 /path/to/diff3: subsidiary program `diff' failed This seems to be a PATH error -- GNU diff is installed in /path/to/diff, but the system (Solaris 5.8) has a diff in /usr/bin/diff, which seems to be getting invoked by diff3. Clearly this is a "configuration error" but MediaWiki should detect the failure of diff3 and either reject the edit because it can't merge OR do something otherwise intelligent rather than truncating the article text and committing it.
This was already fixed on the head branch; I've copied it into REL1_5 and it should appear in 1.5.2. The change you want is: http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/GlobalFunctions.php? r1=1.206&r2=1.207&diff_format=u