[Archivesspace_Users_Group] ASpace Version 2.8.0, custom plugin throwing error, "language"

Solek, VivianLea VivianLea.Solek at Kofc.Org
Mon Nov 1 10:40:24 EDT 2021


Good morning,

Question re: your statement.  I am using the (now) built-in Harvard plug-in to import my records into ASpace.  I have been using “multiple languages” in the "lang_materials" field.  With your statement, I am wondering if I can actually put the various languages, such as “English; French; Spanish” separated by a semicolon.  That would be much more useful that the term “multiple languages.”

Thank you for any insight you can provide.

Sincerely,
VivianLea

VivianLea Solek
Archivist
Knights of Columbus Supreme Council Archives

1 State Street
New Haven, CT 06511-6702
Phone 203 752-4578
Fax 203 865-0351

From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Andrew Morrison
Sent: Monday, November 1, 2021 10:15 AM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: Re: [Archivesspace_Users_Group] ASpace Version 2.8.0, custom plugin throwing error, "language"


The simple "language" property of resources and archival objects (which I assume is what is held in the obj variable in your code), that held a single ISO 639/2 language code, was scrapped in 2.7.0. Instead, there is now a "lang_materials" property, holding a much more complicated data structure, to allow multiple ISO 639/2 language codes and/or language notes to be added to a record. Here's how the core ArchivesSpace MARCXML exporter handles that:



https://github.com/archivesspace/archivesspace/blob/3851abd72727270e6c07b5d1bfe7efdcda55c9f5/backend/app/exporters/models/marc21.rb#L137-L144<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farchivesspace%2Farchivesspace%2Fblob%2F3851abd72727270e6c07b5d1bfe7efdcda55c9f5%2Fbackend%2Fapp%2Fexporters%2Fmodels%2Fmarc21.rb%23L137-L144&data=04%7C01%7Cvivianlea.solek%40kofc.org%7C211c9310418f485b483508d99d41fc92%7C8a4b69f88bb74be59eda6c40a157248c%7C0%7C1%7C637713729015299520%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=kKdv34iQVt6YlS0y3tA91r6OxaSd6W2ihAj3QokneQw%3D&reserved=0>



Andrew.




On 11/1/21 13:27, Mark Cyzyk wrote:
All,

I have tracked down an error to Line 28 in our custom MARCXML export plugin:

#20160621LJD: 008 - Change 'xx' at positions 15-16 with 'mdu' for Maryland per technical services.
def self.assemble_controlfield_string(obj)
date = obj.dates[0] || {}
string = obj['system_mtime'].scan(/\d{2}/)[1..3].join('')
string += obj.level == 'item' && date['date_type'] == 'single' ? 's' : 'i'
string += date['begin'] ? date['begin'][0..3] : " "
string += date['end'] ? date['end'][0..3] : " "
string += "mdu"
17.times { string += ' ' }
string += (obj.language || '|||')                           ← LINE 28
string += ' d'

Insofar as this was working previous to our upgrade to ASpace Version 2.8.0 (Yes, I know, we're due for an upgrade!), can you see anything here that might be the cause of breakage?   Maybe "obj.language" is no longer correct???

Advice appreciated!

Mark

--

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
mcyzyk at jhu.edu<mailto:mcyzyk at jhu.edu>

Verba volant, scripta manent.



_______________________________________________

Archivesspace_Users_Group mailing list

Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>

http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=04%7C01%7Cvivianlea.solek%40kofc.org%7C211c9310418f485b483508d99d41fc92%7C8a4b69f88bb74be59eda6c40a157248c%7C0%7C1%7C637713729015309508%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=m4BlKiUKAkttOnQJRAdRkDVgxUYblBzQi6mHmUf4NVk%3D&reserved=0>

CONFIDENTIALITY NOTICE: This message and any attachments may contain confidential, proprietary or legally privileged information and is intended only for the use of the addressee or addressees named above for its intended purpose. If you are not the intended recipient of this message, this message constitutes notice that any review, retransmission, distribution, copying or other use or taking any action in reliance on the information in this message and its attachments, is prohibited. If you receive this communication in error, please immediately advise the sender by reply e-mail and delete this message and its attachments from your system without keeping a copy. Unless expressly stated in this e-mail, nothing in this message may be construed as a digital or electronic signature. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20211101/134b7b3e/attachment.html>


More information about the Archivesspace_Users_Group mailing list