Ampersands in unittitles and notes causing print to PDF to fail.

Description

Collections that formerly could print to PDF are now failing following ArchivesSpace upgrade. Version is actually listed as 2.5.2 which is not available in the dropdown.

Error message is as follows:

org.xml.sax.SAXParseException; lineNumber: 89; columnNumber: 130; The entity name must immediately follow the '&' in the entity reference.
net.sf.saxon.s9api.DocumentBuilder.build(net/sf/saxon/s9api/DocumentBuilder.java:379)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:453)
org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:314)
RUBY.parse(/archivesspace/gems/gems/saxon-xslt-0.8.2.1-java/lib/saxon/xml.rb:28)
RUBY.XML(/archivesspace/gems/gems/saxon-xslt-0.8.2.1-java/lib/saxon/processor.rb:58)
RUBY.XML(/archivesspace/gems/gems/saxon-xslt-0.8.2.1-java/lib/saxon/xml.rb:10)
RUBY.to_fo(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/AS_fop.rb:32)
RUBY.to_pdf(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/AS_fop.rb:38)
RUBY.block in run(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/job_runners/print_to_pdf_runner.rb:45)
archivesspace.data.tmp.jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus__minus_any_minus.webapp.WEB_minus_INF.app.lib.request_context.open(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/request_context.rb:24)
RUBY.run(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/job_runners/print_to_pdf_runner.rb:14)
archivesspace.data.tmp.jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus__minus_any_minus.webapp.WEB_minus_INF.app.lib.background_job_queue.invokeOther45:run(archivesspace/data/tmp/jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus__minus_any_minus/webapp/WEB_minus_INF/app/lib//archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/background_job_queue.rb:126)
archivesspace.data.tmp.jetty_minus_0_dot_0_dot_0_dot_0_minus_8089_minus_backend_dot_war_minus__minus_any_minus.webapp.WEB_minus_INF.app.lib.background_job_queue.run_pending_job(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/background_job_queue.rb:126)
RUBY.block in start_background_thread(/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_any/webapp/WEB-INF/app/lib/background_job_queue.rb:169)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:246)
java.lang.Thread.run(java/lang/Thread.java:748)

Environment

None

Activity

Show:
Christine Di Bella
March 12, 2019, 1:24 PM

- could you attach an EAD for something this is happening to so that we can take a look? There are some other ampersand issues noted in JIRA, but we want to see if what you're experiencing is different. You're referring to the PDF on the staff side, it sounds like?

Chris Tanguay
March 12, 2019, 2:07 PM
Edited

Yes, the error is occurring when printing to PDF from the staff user interface. Here's some sample EAD where the errors are occurring. Note: on exporting the ead the & was replaced with &

<c id="aspace_ref1515_95e" level="file">
<did>
<unittitle>Bird &amp;amp; Son Company</unittitle>
<unitid audience="internal" identifier="21453"
type="Archivists Toolkit Database::RESOURCE_COMPONENT">21453</unitid>
</did>
</c>

Here's what the same title looks like in the staff interface.

Manually correcting the ampersands to &amp;amp; has been fixing the errors, but this wasn't necessary pre-upgrade.

Wilhelmina Randtke
March 21, 2019, 12:48 PM

Related bug about ampersand handling and public print: https://archivesspace.atlassian.net/browse/ANW-863

Christine Di Bella
May 8, 2019, 10:57 PM

Thanks to , a fix has been applied for the ampersand issues with the staff PDF. It will be included in the release candidate for 2.6.0 that we hope to put out this week. Testing is very much encouraged!

Done

Assignee

Blake Carver

Reporter

Chris Tanguay

Labels

Fix versions

Priority

Major