Notice: Undefined property: DOMDocument::$documentElement

I recently re-opened an old (1 year) Symfony project and I am having an error on every page (I don't remember having this issue a year ago) :

[exception] 500 | Internal Server Error | Symfony\Component\Config\Exception\FileLoaderLoadException
/var/www/[...]/wdt.xml

ContextErrorException: Notice: Undefined property: DOMDocument::$documentElement

If I clear the cache, the error disappear but as soon as I edit and save a file, the error is showing up again. The project was using Symfony 2.8 and I updated to Symfony 3.2 but it didn't solve the issue.

I don't think the problem is related to the wdt.xml file and I think it might be related to my laptop config.

I don't really know where to start to investigate so any suggestion is welcome!

Edit 1 : I am actually having the same problem with another project I created few days ago. The project don't use any additional bundles and I just created 5 entities and generated the MySQL database.

Edit 2 : After some more researched, I decided to create a new Ubuntu VM and test a new Symfony project and it just work perfectly so it must be something to do with the configuration on my laptop.

Edit 3 : After some more tests, here is what I get when I add a print_r($dom); in the file XmlUtils.php (vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php) line 59 :

Ubuntu VM (no error) :

DOMDocument Object ( [doctype] => [implementation] => (object value omitted) [documentElement] => (object value omitted) [actualEncoding] => [encoding] => [xmlEncoding] => [standalone] => 1 [xmlStandalone] => 1 [version] => 1.0 [xmlVersion] => 1.0 [strictErrorChecking] => 1 [documentURI] => /var/www/my_project/web/ [config] => [formatOutput] => [validateOnParse] => 1 [resolveExternals] => [preserveWhiteSpace] => 1 [recover] => [substituteEntities] => [nodeName] => #document [nodeValue] => [nodeType] => 9 [parentNode] => [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [attributes] => [ownerDocument] => [namespaceURI] => [prefix] => [localName] => [baseURI] => /var/www/my_project/web/ [textContent] => %kernel.charset% %kernel.default_locale% )

Ubuntu laptop (error) :

DOMDocument Object ( [validateOnParse] => 1 [nodeName] => #document [nodeValue] => [nodeType] => 9 [parentNode] => [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [attributes] => [ownerDocument] => [namespaceURI] => [prefix] => [localName] => [baseURI] => /var/www/lab/symfony/booklib/web/ [textContent] => %kernel.charset% %kernel.default_locale% )

It looks like there is some missing information on my laptop...

So basically, the function $dom->loadXML doesn't return the same value on my laptop environment and inside the VM... any idea why?


I have Ubuntu 16.04 installation with php7.0.15, and i fixed the error by just removing php-xdebug extension.

sudo apt-get purge php-xdebug

Undefined property: DOMDocument::$documentElement in symfony , (1/1) ErrorException Undefined property: DOMDocument::$documentElement. the error is occuring in vendor/symfony/dom-crawler/Crawler.php', 277. @inverse Nope and now I cannot neither reproduce. Anyway sometimes was not present other yes. So I am guessing it is just related to some cache or similar. Or some other dependencies in the OS.


I finally resolved the problem by uninstalling / reinstalling php7. I have no idea why I had this issue though...

PHP7.1 Notice: Undefined property: DOMDocument, stack trace. cmeeren. (@cmeeren). 1 year, 9 months ago. [03-Jul-2018 20:32:​14 UTC] PHP Notice: Undefined property: DOMDocument::$documentElement in​  Continue reading IPD Implementation at Walt Disney Imagineering → Integrated project delivery is a process that brings together all participants in the design, construction and fabrication process as equal stakeholders.


In my case the error was triggered by the dom.so extension being loaded in two places. Removing one fixed the problem.

Undefined property: DOMDocument::$documentElement in Magento , Notice: Undefined property: DOMDocument::$documentElement in /wp-content​/plugins/amp/includes/sanitizers/class-amp-dev-mode-sanitizer.php on line 33. Trust Administration. Serving Trustees in administering a Trust Estate, including transferring real property and financial accounts, coordinating inventory and appraisal, and investing and distributing trust funds.


This is very strange BUT try to change php extensions load order in php config. This solve my problem... move dom extension above or below in list

Class 'DOMImplementation' not found, in XmlUtils.php line 133 (1/3) ContextErrorException Notice: Undefined property: DOMDocument::$documentElement in XmlFileLoader.php  Property management companies often offer multiple forms of communication, from face-to-face conversation with a receptionist or leasing agent to contact via email or an online resident portal, says Lynn Edmondson, regional manager of Wendover Housing Partners, a property management company based in Altamonte Springs, Florida.


Hi I also meet this problem. The way I resolve it is:

composer update

Hope that help some one.

I have a Internal Server error, public readonly DOMElement $ documentElement ;. public string Inherited properties */ The location of the document or NULL if undefined. encoding. Property Id: 251567 This is a beautiful large 3-bedroom town home Laundry insideHVAC and private yard 3,599 one year lease low security with good credit and solid income. 1300 sq feet All new hardwood floors Laundry Dishwasher Microwave hood 2 full bathrooms Master bedroom 17x14 with a large walk in closet 3 car spaces Large private yard (photo


Blank BO screen after moving 1.7.5 shop to other location, Notice: Undefined property: DOMElement::$myProp in C:\Program Files\​EasyPHP variable (in other words, not only in DOMDocument::$​documentElement). This is a guide on how to fix "Undefined property" notice in PHP. This is a guide on how to fix "Undefined property" notice in PHP.


DOMDocument - Manual, Hi, What version of the Premium add-on are you using? Overwriting the file may not be the best solution as your changes will be undone when the plugin is updated.


Document Object Model, I was in need of a probate lawyer so I called a few and after speaking to Brittany I decided to go with her. She came to my house which was really convenient, she gathered the necessary paperwork and the probate process began.