Page MenuHomePhabricator

Errors from ResourceLoaderImage::variantize(): "failed to load external entity"
Closed, ResolvedPublic

Description

Some people (@Krenair) are getting errors from ResourceLoaderImage::variantize(): "failed to load external entity".

Apparently we should wrap that method in $loader = libxml_disable_entity_loader(); ... libxml_disable_entity_loader( $loader );? Or maybe we can read the file with file_get_contents() and load it from string rather than from file?

1Warning: DOMDocument::load(): I/O warning : failed to load external entity "resources/lib/oojs-ui/themes/mediawiki/images/icons/add.svg" in includes/resourceloader/ResourceLoaderImage.php on line 275
2Notice: Trying to get property of non-object in includes/resourceloader/ResourceLoaderImage.php on line 278
3Fatal error: Call to a member function appendChild() on null in includes/resourceloader/ResourceLoaderImage.php on line 281

Event Timeline

matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex added subscribers: matmarex, Krenair.

Change 267613 had a related patch set uploaded (by Bartosz Dziewoński):
ResourceLoaderImage: DomDocument::loadXml rather than DomDocument::load

https://gerrit.wikimedia.org/r/267613

Change 267613 merged by jenkins-bot:
ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load

https://gerrit.wikimedia.org/r/267613