Page MenuHomePhabricator

Valid html files get an error message "Invalid file format"
Open, Needs TriagePublic


All html files I try to upload get this message: "There was an error handling the file upload: Invalid file format." I made sure to follow the istallation guide

I made sure I have a 100mb upload limit and that uploads are enabled. I am using my own mediawiki server on windows 10 pro x64 with easyphp and MySQL. I have composer and pandoc installed in C:\programData\ and I have tidy enabled and running.

<my ip>:888/index.php/Special:Log has no log entries from the failed conversion attempts.

Here is an example html that fails (its named test.html)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<!-- I have also used these DOCTYPE tags-->
<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">-->
<!--<!DOCTYPE html>-->

<title>Title of the document</title>

The content of the document......


Event Timeline

Kablammyman raised the priority of this task from to Needs Triage.
Kablammyman updated the task description. (Show Details)
Kablammyman added a subscriber: Kablammyman.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 15 2015, 4:46 PM

Which extension version and which MediaWiki version is this about?

opps, sorry for leaving out some vital information. Anyway, here are all my specs:

MediaWiki 1.26

Html2Wiki: REL1_26


It looks like your upload is being blocked.

What is the value of $wgCheckFileExtensions in LocalSettings?

How about $wgStrictFileExtensions?

And $wgVerifyMimeType

If this is a private wiki, you could try setting all of these to false, and testing an upload:

$wgVerifyMimeType = false;
$wgStrictFileExtensions = false;
$wgCheckFileExtensions = false;

If any of those are set to TRUE, then you would need to add to $wgFileExtensions. To explicitly add htm and html to $wgFileExtensions:

$wgFileExtensions[] = 'htm';
$wgFileExtensions[] = 'html';