标签 xml 下的文章

magento - ValidationSchemaException 出错 - esconfig.xsd - 因为cPanel环境升级xml版本导致

现象:magento首页或单页内容显示正常,但在产品分类页提示出错,如:

Exception #0 (Magento\Framework\Config\Dom\ValidationSchemaException): Processed schema file: public_html/vendor/magento/module-elasticsearch/etc/esconfig.xsd
complex type 'mixedDataType': The content model is not determinist.
Line: 18

#1 Magento\Framework\Config\Dom->_initDom() called at [vendor/magento/framework/Config/Dom.php:116]
#2 Magento\Framework\Config\Dom->__construct() called at [vendor/magento/framework/Config/Reader/Filesystem.php:196]
#3 Magento\Framework\Config\Reader\Filesystem->_createConfigMerger() called at [vendor/magento/framework/Config/Reader/Filesystem.php:151]
#4 Magento\Framework\Config\Reader\Filesystem->_readFiles() called at [vendor/magento/framework/Config/Reader/Filesystem.php:132]

尝试:将文件 vendor/magento/module-elasticsearch/etc/esconfig.xsd 中的这行内容删除或注释掉:<xs:element type="xs:string" name="default" minOccurs="1" maxOccurs="1" />

原因可能是cPanel环境中,升级了xml,导致软件不兼容。

参考: