[EP-tech] Error in XML::LibXML

Paolo Tealdi paolo.tealdi at polito.it
Thu Jan 30 08:05:14 GMT 2020


Dear all,

after the XML::LibXML module upgrade, to 2.0201 released on Jan, 13, eprints 
crash, complaining that it can't process anymore entities in XML phrases files.

Example of error:
---
Failed to parse XML file: [phrase_file.xml]: Entity: line 9: parser error : 
Entity 'agrave' not defined
---


After 2 hours of debugging, with two sites down ( :-( ), i realised that with 
this version the module needs one more MANDATORY option at startup, that enables 
external DTD parsing, now disabled by default.
This patch is for 3.3.15, but it's so simple that i think it works also in 3.4.* ...



--- XML/LibXML_old.pm    2017-04-28 11:03:16.000000000 +0200
+++ XML/LibXML.pm       2020-01-30 08:42:55.273103000 +0100
@@ -66,7 +66,7 @@

  ##############################################################################

-our $PARSER = XML::LibXML->new();
+our $PARSER = XML::LibXML->new( expand_entities=>1, load_external_dtd=>1);

  sub CLONE
  {


Best regards,
Paolo Tealdi

-- 
Ing. Paolo Tealdi         Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906625
Indirizzo/Address : C.so Duca degli Abruzzi,  24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this e-mail




More information about the Eprints-tech mailing list