Page MenuHomePhabricator

HTML pages fail to import with DOMXPath error
Open, Needs TriagePublic


I'm using the Vagrant based developer's MediaWiki install (

When trying to import a Creative Commons test zip file(referenced here I get an error.

Images import fine.
HTML pages fail with error...

There was an error handling the file upload: DOMXPath::__construct expects parameter 1 to be DOMNode

Event Timeline

Mattcave created this task.Jan 26 2017, 4:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 26 2017, 4:00 PM

I know tidy handling has changed in MW, and I'm not sure if that's causing the issue. However, last I recall, I added a dependency check for Tidy so that really shouldn't be the cause.

Can you tell me if the Tidy module is in your PHP?

php -m | grep -i tidy

Yes, it is.

[root@ip-172-31-3-156 html]# php -m | grep -i tidy
Adroit added a subscriber: Adroit.Mar 7 2017, 5:43 AM

I'm also getting a DOMXPath error with anything but trivially small ZIPs. Not sure if it's the same.

Catchable fatal error: Argument 1 passed to DOMXPath::__construct() must be an instance of DOMDocument, null given, called in /opt/bitnami/apps/mediawiki/htdocs/extensions/Html2Wiki/vendor/querypath/querypath/src/QueryPath/CSS/DOMTraverser.php on line 406 and defined in /opt/bitnami/apps/mediawiki/htdocs/extensions/Html2Wiki/vendor/querypath/querypath/src/QueryPath/CSS/DOMTraverser.php on line 440