Mediawiki:oojs-ui.styles.icons模块导致500服务器错误

时间:2016-01-31 03:19:26

标签: php mediawiki visual-editor

我为Mediawiki安装了VisualEditor并正确配置,因此编辑模式运行正常。但升级到较新的Mediawiki版本后,VisualEditor再也无法工作了。

一旦我检查了我的DOM控制台,我注意到,问题是由名为oojs-ui.styles.icons的模块引起的,造成500服务器错误。我还查看了我的error.log文件。这些是必不可少的细节:

"SyntaxError: expected expression, got '<'
Evaluating http://localhost:3000/angular2/src/platform/browser/ruler
Error loading http://localhost:3000/src/main.ts" angular2-polyfills.js:138:14

SyntaxError: expected expression, got '<'

显然,由于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 &quot;/var/www/html/Wiki/resources/lib/oojs-ui/themes/mediawiki/images/icons/add.svg&quot; 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" 属性,无法识别文件路径。所以我检查了文件/var/www/html/Wiki/includes/resourceloader/ResourceLoaderImage.php的第275行,其中包含以下内容:

&quot;

通常,php函数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(); } 应该可以正常工作,不应该吗?我想知道为什么这不起作用。之后我更新了每个扩展程序,但仍然没有更改。

我需要做什么才能修复error.log文件中的错误消息?

0 个答案:

没有答案