Page MenuHomePhabricator

HTML pages fail to import with DOMXPath error
Closed, DeclinedPublic

Description

I'm using the Vagrant based developer's MediaWiki install (https://www.mediawiki.org/wiki/MediaWiki-Vagrant).

When trying to import a Creative Commons test zip file(referenced here https://www.mediawiki.org/wiki/Extension:Html2Wiki#Import_a_blog_post_.2F_webpage_complete) 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

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
tidy

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

@freephile: Hi! Is this task still valid and should still be open? If yes, are you still working (or still plan to work) on this task? (If you do not plan to work on this task anymore, please remove yourself as assignee (via Add Action...Assign / Claim in the dropdown menu) so in theory others could work on it.) Thanks!

Aklapper added a subscriber: freephile.

@freephile: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome! Thanks for your understanding!