Began getting this fatal error when trying to import a translated xlf file to a job.

Fatal error: Call to a member function registerXPathNamespace() on a non-object in /sites/all/modules/contrib/tmgmt/translators/file/tmgmt_file.format.xliff.inc on line 275

Not many details figured out just yet. Will add more as I continue to debug. Starting this issue off to see if anyone else is getting this error and might have some insight. Couldn't find anything related to it in any of the other issues.

Comments

paboden created an issue. See original summary.

paboden’s picture

Issue summary: View changes
paboden’s picture

Issue summary: View changes
nmalinoski’s picture

This occurred for me when importing XLIFF with badly-encoded HTML entities, such as &„ and &“, in the translated text. Correcting these entities (As in removing the second, rogue ampersand) avoided the PHP error and the warnings.

What's odd is that I've imported XLIFF with non-XML entities before (”, for example); but, while I've gotten similar import warnings (below), I did not receive the PHP error until today with this specific condition. I remember now getting a blank white screen before; display_errors must have been turned off on that server.

Here's a sample of the warnings I received after hitting the back button from the PHP error:

    Warning: simplexml_load_string(): Entity: line 625: parser error : Entity 'bdquo' not defined in TMGMTFileformatXLIFF->getImportedXML() (line 273 of /path/to/drupal/sites/all/modules/contrib/tmgmt/translators/file/tmgmt_file.format.xliff.inc).
    Warning: simplexml_load_string(): <h3>Translated text &„Foo&“ Translated text</h3> in TMGMTFileformatXLIFF->getImportedXML() (line 273 of /path/to/drupal/sites/all/modules/contrib/tmgmt/translators/file/tmgmt_file.format.xliff.inc).
    Warning: simplexml_load_string(): ^ in TMGMTFileformatXLIFF->getImportedXML() (line 273 of /path/to/drupal/sites/all/modules/contrib/tmgmt/translators/file/tmgmt_file.format.xliff.inc).