Skip to first unread message

Carolyn Sullivan

unread,
Jan 21, 2023, 6:01:30 PM1/21/23
to AtoM Users

Hello all,

I’m having an issue using the EAD 2002 XML through the interface.  Specifically, when I try to use this function, I receive the error message ‘error on line 2 at column 6: XML declaration allowed only at the start of the document’ (see attached image EADError_012123.png).  In an effort to troubleshoot this issue, I’ve followed the steps recommended in this thread:

(1) Checking for special characters:

I created a test fonds that had no special characters by typing text into the interface (ie. alphanumeric characters, -, .)

(2) Code customisations:

We have a very basic plugin theme—I’m not sure how this would affect functionality.  Would just switching it off through the interface and reverting to the out of box theme be a good diagnositic test as to whether this is the issue?

(3) The full version of our AtoM instance, as obtained with php symfony tools:get-version

2.6.4 v184

(4) Check atom-worker logs… there doesn’t seem to be anything here (see image EADError_AtomWorkerLog.png)

The webserver logs seem a bit more indicative of an issue—‘The Test Fonds’ was the creatively named test fonds for which I was trying to export an EAD XML finding aid (see image EAD_webserverlog.png)

But it does exist in this folder… I can’t see why the finding aid would need different permissions for favicon.ico, but maybe that’s an issue? (see permissions, EADError_usrsharenginx.png).

Our AtoM instance IS behind a firewall as well, so if you don’t think it’s actually an issue with accessing the favicon.ico file, I’m going to try those workarounds next.

 Thank you so much for your time and consideration,

Carolyn.

EADError_012123.PNG
EADError_usrsharenginx.PNG
EAD_webserverlog.png
EADError_AtomWorkerLog.PNG

Carolyn Sullivan

unread,
Jan 24, 2023, 2:41:36 PM1/24/23
to AtoM Users
Any suggestions?

Dan Gillean

unread,
Jan 24, 2023, 3:04:56 PM1/24/23
to ica-ato...@googlegroups.com
Hi Carolyn, 

Sorry for the delay. I'm a bit stumped on this one, and at first glance our team didn't have many immediate suggestions either, but here goes!

I am not a developer or system admin, but I do worry a bit seeing a mix of permissions between www-data and root. AtoM expects all files and directories below the root installation directory to be owned by the www-data user. You can re-apply the expected filesystem permissions with: 
  • sudo chown -R www-data:www-data /usr/share/nginx/atom
Is your base URL correctly configured in Admin > Settings > Site information? See: 
Does your site have a custom theme? Does a favicon  called "favicon.ico"  (whether the original AtoM "A" or a customized version) still exist? I believe this normally lives in the root installation directory. I too don't know why the favicon would matter for EAD generation, but let's at least explore that further. 

Unless you've spread your deployment across multiple different VMs in different locations with different access rules etc, then a firewall per se shouldn't be the issue here.

Are you able to export your test record from the command-line, rather than via the browser? See the following task, which you could use with the --single-slug task option for testing:
Are you able to use the browser's View Page Source tools (via right click) to see the export page code and  hopefully determine exactly what it is failing on?

Barring that, are you able to use Debug mode to see more information in the browser? See: 

Hopefully something here will shake out a next step for us to investigate. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/12e24d62-c464-4a68-936e-dd16336ae64en%40googlegroups.com.

Carolyn Sullivan

unread,
Jan 24, 2023, 8:53:24 PM1/24/23
to AtoM Users
Hello Dan,

Thank you for your suggestions, I really appreciate you and your team taking the time to help us troubleshoot this!  
  • I ran the command to change the file permissions that you recommended, then restarted nginx.  
  • The base URL in site information is https://biblio.uottawa.ca/atom, which seems right...
  • Yes, it has a custom theme, and I've placed favicon.ico in the root directory... no such luck :(
  • The installation is all on a single VM.
  • Trying the commandline XML Export:
    • I half suspect this record might give me weird errors because there are special characters in the description (it's a bilingual French-English school), but I tried exporting it anyways: https://biblio.uottawa.ca/atom/index.php/16-days-of-activism-against-gender-violence-2nd-campaign-1992
    • When I do this, it seems to run; no idea what the php warning is for:  
      /usr/share/nginx/atom$ sudo -u www-data php symfony export:bulk --single-slug="16-days-of-activism-against-gender-violence-2nd-campaign-1992" ./test-export.xml

      PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/nginx/atom/plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccessBodyDidElement.xml.php on line 137
      .
      Export complete (1 descriptions exported).
  • I don't see anything in the source tools except some redirect codes under the Network tab (see image PageSource_012423.png)
  • The production server (ie. https://biblio.uottawa.ca/atom )  is public.
  • I'll try running debug mode on our QA server next.  Where can I find the index.php file I need to modify?
Thanks for all your help!

Carolyn.
PageSource_012423.PNG

Dan Gillean

unread,
Jan 25, 2023, 8:44:38 AM1/25/23
to ica-ato...@googlegroups.com
Hi again Carolyn, 

I'm going to need to wait for some input from our developers, but thank you for the additional information - here's what I have found. 

First, with the public URL I was able to visit your site, find a small fonds, and reproduce the issue myself. It's worth noting that the public demo site is also running 2.6.4-v184 and EAD 2002 XML export is working there as expected. 

I tried the Annette Clough fonds because a) it only contains about 27 records, so it shouldn't time out when generating the EAD XML response in the browser, and b) it appears to be a monolingual (English) archival unit, so we can rule out multi-lingual content being the cause. (In general, so long as you have not copied and pasted content from a non-UTF-8 source like a Word document, French accents and the like should not cause import/export issues, as they can all be properly rendered in UTF-8.)

When I encountered the error (error on line 2 at column 6: XML declaration allowed only at the start of the document), I used the "View page source" to see the export. For some reason, there is a beginning blank line in your XML that is triggering this error:

xml.png

I'm not sure why this is occurring, and am waiting to see if any of our team have further ideas. 

In terms of the CLI export attempt...

It sounds like the export was successful, despite the warning? Were you able to view the exported file? The warning returned points to this line of code: 
Which appears to be an attempt to get an array of notes associated with the record by language. While it could be good for us to investigate this warning further, a) it's a warning not an error, and did not seem to prevent your CLI export from completing successfully, and b) this is a very different error from the browser error, and I don't think they are directly related. 

Meanwhile, here is where the header is being generated when rendering EAD export docs: 
Since you have command-line access, it may be worth double-checking that your local file matches what's in our code repository here? I suspect it does (I'm not sure why someone would modify this file as part of a custom theme, for example), but we can at least rule that out. 

Otherwise, it is possible that the way you've configured your webserver, domain name, and the redirects is affecting page renders that is allowed in the more lax HTML standard, but breaks the strict rules of XML - I'm guessing here. I will try to confirm the possibility of this theory with our team and suggest where you could look if it is a viable idea. 

More soon, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages