braincrafted / bootstrap-bundle

BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.
http://bootstrap.braincrafted.com
MIT License
399 stars 184 forks source link

PHP7.1 Notice: Undefined property: DOMDocument::$documentElement #461

Open Raffaello opened 7 years ago

Raffaello commented 7 years ago
 [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]                         

    Unable to parse file "/var/www/xxx/vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/B  
  ootstrapBundle/DependencyInjection/../Resources/config/services/form.xml".                           

    [InvalidArgumentException]                                                                         

    The XML file "/var/www/xxx/vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/Bootstrap  
  Bundle/DependencyInjection/../Resources/config/services/form.xml" is not valid.                      

    [Symfony\Component\Debug\Exception\ContextErrorException]                                          
    Notice: Undefined property: DOMDocument::$documentElement                                          

  .                                                                                                    

anyone knows why i have this error?

php7.1-xml and libxml2 is installed.. What am i missing?

inverse commented 7 years ago

@Raffaello did you make any progress with this error?

Raffaello commented 7 years ago

@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.

inverse commented 7 years ago

@Raffaello We managed to work around the issue by upgrading the distribution-bundle.

https://packagist.org/packages/sensio/distribution-bundle#v4.0.38

Looks like this commit solved it: https://github.com/sensiolabs/SensioDistributionBundle/commit/95469374e703f01b8e760023ac4f2f64da6a1dd9

ydiev commented 6 years ago

I had same issue. In my case it had came from the "extension=dom.so". I guess because it was enabled twice. Once from php.ini and once from the mods-available/dom.ini. So I just deleted it from my php.ini file and it fixed the problem for me. Just sharing my solution here. Could help to someone.

catchmareck commented 6 years ago

@ydiev I love you, man!!! I've been debugging some WP Plugin for a week and you've just ended my torture. Worked like a charm. Thank you for posting your solution!

ghost commented 6 years ago

@ydiev tks guy! works for me.