2

I have an issue on a Magento 2.4.5.

I got below error.

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

after changing search engine Elasticsearch to MySQL then index command working.

4
  • verify elastic search version, maching with magento requirement or not. Dec 8, 2023 at 4:29
  • version" : { "number" : "7.15.0", "build_date" : "2021-09-16", "lucene_version" : "8.9.0",
    – kiran
    Dec 8, 2023 at 5:06
  • Please search for this string in your module paths, such as in the app and vendor directories. There might be an issue defined in your XML file.
    – Msquare
    Dec 8, 2023 at 7:17
  • magento.stackexchange.com/questions/371144/… try this link and Temporary fix @kiran Dec 8, 2023 at 11:54

3 Answers 3

2

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.

1

This error has happened since ea-libxml2 was updated from ea-libxml2-2.11.5-1.1.2.cpanel.x86_64 to ea-libxml2-2.12.2-1.2.1.cpanel.x86_64

Temporary fix to get the site working again was to downgrade:

yum downgrade ea-libxml2-2.11.5-1.1.2

Now have to work out why the xml files don't work with the new package

0

You can reference This answer: My issue was resolved with this solution, But I am not sure Whether this solution might have some backward compatibility issues. Please apply first on the dev or local environment before on the production environment

complex type 'mixedDataType': The content model is not determinist

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.