2

I have an issue on a Magento 2.4.4-p1 instance that appeared during the night somehow.

The indexation process for inventory is not working anymore, as well as the category page which is not loading due to the following exception:

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

I tried to find some non-determinist records, and duplicated values, but nothing so far.

Did someone encounter this error in the past?

3
  • I've had exactly the same issue on 2.4.5-p1. Weirdly, it's only affecting our staging site. Live and local seem to be untouched. Anyone have any ideas? Commented Dec 7, 2023 at 12:52
  • @iupaem added code below so please check it. Commented Dec 8, 2023 at 10:49
  • we have the same problem. Its also a Cpanel server. We switched to Mysql search for the moment. Could be the module mirasvit - elasticsearch ultimate a problem? Do you have also this module?
    – HP-mag
    Commented Dec 11, 2023 at 9:41

1 Answer 1

4

First backup this file then remove one line check it

vendor/magento/module-elasticsearch/etc/esconfig.xsd

<xs:element type="xs:string" name="default" minOccurs="1" maxOccurs="1" />

this line removes only

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* This schema must be used to validate esconfig.xml files
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="config" type="configType" />
<xs:complexType name="configType" mixed="true">
  <xs:choice maxOccurs="unbounded" minOccurs="1">
     <xs:element name="stemmer" type="mixedDataType" />
     <xs:element name="stopwords_file" type="mixedDataType" />
  </xs:choice>
</xs:complexType>
<xs:complexType name="mixedDataType">
   <xs:choice maxOccurs="unbounded" minOccurs="1">
      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
   </xs:choice>
  </xs:complexType>
 </xs:schema>

After run command then check it.

2
  • This solution works, but I'm unsure if removing the default Magento code is a long-term solution. I can confirm that this is about the automatic upgrade of the ea-libxml2 library from 2.11.5-1.1.2.cpanel.x86_64 to 2.12.2-1.2.1.cpanel.x86_64. Downgrading this library would fix the issue for the moment, but I'm not sure about the other impact.
    – user103251
    Commented Dec 11, 2023 at 8:16
  • There is an official issue opened here: github.com/magento/magento2/issues/38254
    – user103251
    Commented Dec 11, 2023 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.