It has been half a year since I posted #699434: Workaround check for dom support for D6. There's a similar problem with D7 and I've finally traced it down to a failure of DOMDocument::loadHTML() (callstack: drupalLogin() -> drupalPost() -> drupalGet() -> checkForMetaRefresh() -> parse()).
The failure is masked by an @ prefix, but the call to DOMDocument::loadHTML() branches to _drupal_shutdown_function(), and for the user it looks like the batch hangs.
Removing the @ prefix got me this:
Fatal error: Call to undefined method domdocument::loadHTML() in drupal-7\modules\simpletest\drupal_web_test_case.php on line 1528
The solution according to #786288-2: Call to undefined method domdocument::loadHTML() (commenting out extension=php_domxml.dll
in php.ini) worked for me — Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9
simpletest.module should detect the error condition and provide the work-around to the user. I can provide testing, but I don't know how to implement it.
(DOMDocument::loadHTML() is used twice in drupal_web_test_case.php and also in filter.module.)
Comment | File | Size | Author |
---|---|---|---|
#4 | 851058-dom-check.patch | 731 bytes | boombatower |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedSimpletest already have a requirement check for the DOMDocument class. The system module also have a requirement check for the 'dom' extension. What kind of weird set up do you have for both those tests to fail?
Comment #2
salvisPlain vanilla XAMPP 1.7.1 on Win7 64-bit.
Note: it's not that 'dom' was missing, but 'xmldom' (or 'domxml') was somehow conflicting and had to be removed!
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedOh PHP is broken in a number of interesting ways :)
The fix would be to switch, in
simpletest.install
, from:to:
Care to provide a patch?
Comment #4
boombatower CreditAttribution: boombatower commentedComment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #6
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.