2017-09-03 79 views
1

我面对下面的错误在我的WordPress网站WordPress的PHP的警告:使用simplexml_load_file()

[03-Sep-2017 10:12:36 UTC] PHP Warning: simplexml_load_file(): in /home/syriacar/public_html/syria-cart.com/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 53 

这里是文件出错的内容

foreach ($plugins as $plugin) { 
     if (file_exists($file = WP_PLUGIN_DIR . '/' . dirname($plugin) . '/wpml-config.xml') && false !== $xml = simplexml_load_file($file)) { 
      $this->xmls[ dirname($plugin) ] = $xml; 
    } 
    } 
+1

你可以发布'wpml-config.xml'文件的内容吗? – Matthew

+0

这里是: \t <定制的类型> \t \t <定制型翻译= “1”>项目 \t \t \t \t <键名= “mh_mharty”> \t \t \t <键名= “mharty_date_format”/> \t \t \t <键名= “mharty_seo_home_titletext”/> \t \t \t <键名=“MH arty_seo_home_descriptiontext” /> \t \t \t <键名= “mharty_seo_home_keywordstext”/> \t \t \t

回答

2

这可能是由于畸形WPML -config.xml文件。

例如,在this支持WordPress论坛页面,可以找到类似的问题,原因是缺少</key>,结束标记</admin-texts>之前。

UPDATE:

在你的意见,你还别说yith-woocommerce-AF filiates警告,所以另一种可能性是,YITH WooCommerce附属插件没有WPML-config.xml中或者是空。

polylang documentation约WPML-config.xml中提到了以下几点:

Developpers必须将WPML-config.xml文件的根目录下的插件或主题的 。

+0

我看着它,但一切看起来不错 –

+0

是的,我已经看到你的XML文件,看起来不错。是警告“[03-Sep-2017 10:12:36 UTC] PHP警告:”只警告关于simplexml_load_file()或在那个警告之前或之后有其他人吗? – user8230352

+0

实际上他们有三个:'[03-Sep-2017 20:19:47 UTC] PHP警告:simplexml_load_file():/home/syriacar/public_html/syria-cart.com/wp-content/plugins/yith -woocommerce-affiliates/wpml-config.xml:1:解析器错误:文档在/home/syriacar/public_html/syria-cart.com/wp-content/plugins/polylang/modules/wpml/wpml-config.php中为空在线53 [03-Sep-2017 20:19:48 UTC] PHP警告:simplexml_load_file():在/home/syriacar/public_html/syria-cart.com/wp-content/plugins/polylang/modules/wpml/ wpml-config.php 53行 ' –