EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08108


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Error in XML::LibXML


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