Civi used to work under Local (née Local by Flywheel) on Windows, but I can't get it to install under the latest version. The Civi installer can't parse the schema xml files due to a path error. What happens is:

  1. CRM_Core_CodeGen_Util_Xml::parse() tries to process the main schema file in civicrm/civicrm/xml/schema/Schema.xml
  2. It loads this file fine, but then runs xinclude() to pull in all the .xml files linked to in schema.xml
  3. It can't find them. It's not looking in the correct place: I can see in Process Monitor that it's looking in the root folder, rather than wp-content/plugins/civicrm/civicrm/xml/schema. xinclude then throws a "failed to load external entity" error.

I've tried:

  • checking that the DomDocument URI is correct - it seems to be fine
  • setting the PHP working directory manually. This helps xinclude() find the files, but it then throws a "trying to build relative URI" error.

I assume it's something different in the Local environment. I've tried 2 different machines. Any ideas what could affect this? It doesn't help that Local has an ungoogleable name.

Latest version of Civi, latest version of WordPress. Local version 5.9.8+5191. libxml 2.9.9.


  • I ran into a similar xinclude issue about a year ago on windows (for drupal but I think the windows part is the relevant part). Let me see if I can find that.
    – Demerit
    Feb 9 '21 at 19:15
  • It was here: github.com/civicrm/civicrm-core/commit/…. What method are you using for install? UI / cv / wp-something?
    – Demerit
    Feb 9 '21 at 19:26
  • Thanks! I thought I had a good look at the slashes, but maybe I've missed something. Will take another pass. Install-wise, I just unzipped into the plugins folder like it's the 90s. Feb 10 '21 at 11:45
  • Hrm. I discovered you can "fix" it by setting the DomDocument->documentURI parameter to a relative path to the file, instead of the absolute path it uses by default. In a standard WP setup this is '../wp-content/plugins/civicrm/civicrm/xml/schema/Schema.xml'. I thought the underlying problem was spaces in the path, but I've just recreated the error without that - so it must be something else in the underlying Local setup. Yeesh. Feb 10 '21 at 16:57
  • Hit a wall, but logged this as an issue at: lab.civicrm.org/dev/wordpress/-/issues/89 Feb 11 '21 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.