Currently I have installed the recent snapshot of VisualEditor for Mediawiki 1.26.2, which uses OOjs-UI, and configured everything correctly. When I was using Mediawiki 1.25 the VE extension worked perfectly for me, but now, after upgrading every software, VisualEditor stopped working.
Once I checked my DOM console I noticed, that the issue is caused by the module called oojs-ui.styles.icons creating a 500 server error. I also took a look into my error.log file. These are the essential details:
2016/01/31 03:33:47 [error] 1178#0: *50446 FastCGI sent in stderr: "PHP message: PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity "/var/www/html/Wiki/resources/lib/oojs-ui/themes/mediawiki/images/icons/add.svg" in /var/www/html/Wiki/includes/resourceloader/ResourceLoaderImage.php on line 275 PHP message: PHP Notice: Trying to get property of non-object in /var/www/html/Wiki/includes/resourceloader/ResourceLoaderImage.php on line 278 PHP message: PHP Fatal error: Call to a member function appendChild() on a non-object in /var/www/html/Wiki/includes/resourceloader/ResourceLoaderImage.php on line 281" while reading response header from upstream, client: 123.123.123.123, server: domain.com, request: "GET /load.php?debug=true&modules=oojs-ui.styles.icons&* HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "domain.com"
Obviously the filepath can't be recognized, because of the " attribute. So I checked line 275 of the file /var/www/html/Wiki/includes/resourceloader/ResourceLoaderImage.php, which contains the following:
protected function variantize( $variantConf, ResourceLoaderContext $context ) { $dom = new DomDocument; $dom->load( $this->getPath( $context ) ); ########## Line 275 $root = $dom->documentElement; $wrapper = $dom->createElement( 'g' ); while ( $root->firstChild ) { $wrapper->appendChild( $root->firstChild ); } $root->appendChild( $wrapper ); $wrapper->setAttribute( 'fill', $variantConf['color'] ); return $dom->saveXml(); }
Normally, the php function getPath() should work fine, shouldn't it? I also tried to remove all settings in the LocalSettings.php, which were done by me. Then I opened the direct url "http://domain.com/load.php?modules=oojs-ui.styles.icons&*" and the error 500 is still there. I even set the correct permissions for the icon folder and ran the update.php script from the maintenance folder.
Am I the only one with this problem? If yes, can you recommend me a fix?