Plack Error: Authority File. Free Floating Subdivisions (Koha 18.11)

This post is a follow up to an earlier one on the matter of uploading the Library of Congress’ open-access subject authority file into Koha.

Having completed a full upload of the Library Of Congress’ newly open-access authorities data set (2014 release), users might experience a related error in the OPAC. This post will address this error and provide steps on how to fix it.

Current Architecture

  • Koha 18.11.05.000
  • Linux Ubuntu 16.04.6 LTS
  • Mysql Ver 15.1 Distrib 10.0.38-MariaDB
  • Apache 2.4.xx

Internal Server Error

After uploading your authority records and re-indexing Zebra, navigate to your OPAC and select the Authority Browser, which can be enabled from the Administration tab in the Koha staff client. (Select ‘Allow’ in the OpacAuthorities option.) This will create a new tab on your OPAC’s homepage.

In my case, Zebra indexed all 3200 free-floating subdivisions at the beginning of the authority file, so they were pretty easy to identify. Click the ‘Details’ button on one of your subdivision records to see the specific MARC data associated with the record. Instead of the expected behaviour, you are presented with Plack’s ‘Internal Server Error’ message instead of the data.

Why is this error happening?

Navigating to your plack error log (it should be in /var/log/koha/<instance name>/plack-error.log, you may come across see the following entry:

Can't call method "authtypetext" on an undefined value at /usr/share/koha/opac/cgi-bin/opac/opac-authoritiesdetail.pl line 89.

This error indicates that each free-floating subdivision record imported into your authority file is not linked to a Koha authority type (topical term, chronological term, uniform title, etc.). Koha does not ship with an authority type for free-floating subdivisions; however, I discovered that the default value located in the the 942 tag within each free-floating subdivision record can be used to create a Koha authority type.

The key to correcting this error is to create a new authority type using the extant value in your authority records’ 942 field.

The key to correcting this error is to create a new authority type using the extant value in your subdivision authority records’ 942 field.

Correcting the Error

First, make sure that field 942 is visible in the Koha editor screen. You can do this by navigating to tag 942 within the authority type Default framework section of Koha –> Administration:

Authority Types
Make tag 942 visible by modifying the Default authority type framework within the Marc Structure option, as above

Second, you want to review the default value in tag 942 of a free-floating subdivision record and use it to create a new authority type. Open a free-floating subdivision record in the staff client as if you were going to edit it and click on the ‘9’ tab. You will see the following:

GEN_SUBDIV will be your new authority type code.

Third, create a new authority type:

The end result should look something like this:

For the ‘Authority field to copy’ field, I used MARC21 authority field 180.

The Result

Depending on your set-up, Koha should now have relinked all of your free-floating subdivisions automatically with this newly created authority type. The latter will also now show up as a search option in the OPAC Authority Browser. Here’s an example:

When a user clicks on the ‘Details’ button, the expected behaviour is seen and they are taken to the relevant MARC data page.

LC Authority Files Available in Marc8, XML, UTF-8

Related post

I recently discovered that Library of Congress authority data sets for books, subjects, names, and other bibliographic elements are available for download as open-source, free data for research.

The process of uploading the files into Koha was quite straightforward. I chose to begin with their subject file, which contains approximately 320,000 entries. The files are located here: https://www.loc.gov/cds/products/marcDist.php

  1. Download the Marc8 files
  2. For each, change the file extension from .marc8 to .mrc
  3. Open a file in MarcEdit via its Batch Edit and choose MARCSplit: Batch Edit

4. You can then split the file into manageable pieces. I chose to split into files of 10,000 records. I have also done files of 20,000. (Koha import times on 10,000 records is about 5-10 minutes)

5. Reindex Zebra after uploading all your files

sudo koha-rebuild-zebra -f -v library2

Free-floating Subdivisions

CAUTION: The subject data set also contains free-floating subdivisions. They are MARC records in their own right. As of Koha 18.11, if you navigate to Search Authorities and attempt to click on the Details link of a subdivision entry, you will get an Internal Server Error. This may be a bug. Update

Authority Search

After clicking on Submit, you are presented with the enter authority file in Koha. In my case, the first 40 pages or so are free-floating subdivision. You can tell because there is not subheading within each entry before the term (i.e., “Topical Heading”, “Corporate Name”, etc.):

Authority Search 2

If you proceed to click on Details, a Plack error (I think) occurs: Internal Server Error. Update: This issue has been resolved

Record Matching Rule for Importing Authorities

CAUTION: I created a record matching rule for authorities upload in order to prevent duplication during upload, based on the information in the Koha 18.11 manual: https://koha-community.org/manual//18.11/en/html/administration.html#record-matching-rules

I created a match rule on the authority’s tag 010$a, or LCCN number, with a match threshold of 100. Then, I created fail-safe match sets using each of the following indexes:

Personal-name 100$a
Corporate-name-heading 110$a
Meeting-name 111$a
Title-uniform 130$a
Chronological-term 148$a
Subject-topical 150$a
Name-geographic 151$a
Term-genre-form 155$a

The match rule then works in this way: If the record to be imported has a value in tag 010$a that is identical to the tag 010$a value in the authority record already in Koha, then a match is found (or, 101 points, which is above the match threshold of 100) and the record is not imported (as defined by the import rule in Koha Staged Record Management). For any reason, if a match is not found on tag 010$a, then check the other indexes (as above) to see if a match exists.

The benefit of having the subdivisions as part of your authority file is that you can control them in your MARC framework as you would the 650$a field. Neat!

Discussing Alan Bush on 89.5FM CIUT in Toronto

Alan Bush

I was recently invited by Classical Underground’s Philip J. Conlon to discuss the work of twentieth-century British composer Alan Bush. Classical Underground is a community radio show based out of the University of Toronto, and focuses on uncovering less well-known composers whose work, for political reasons or otherwise, has been consigned to the proverbial dustbin of history.

Alan Bush was a British composer writing from the early 1920s straight through to the 1980s — a long and distinguished career by any measure. He was also a hard line communist who joined the Communist Party of Great Britain in 1935, shortly after a stint as a member of the Independent Labour Party. He became assistant choral conductor for the London Labour Choral Union, eventually taking over for Rutland Boughton. Perhaps Bush’s most meaningful endeavour was his work on founding the Workers’ Music Association, which is still in existence today.

He made his living composing musical works (and through this receiving commissions for them), and taught composition at the Royal Academy of Music. His style is difficult to place, frequently disrupting any certainty that one may ascribe to his compositional method — perhaps reflective of the turbulent first-half of the twentieth-century in which he was living. He is at once a traditionalist — tonal, melodic and motivic; yet, modern, often flirting with serialist tendencies one may hear from the work of Schoenberg and the Second Viennese School. Many of his works, such as Prelude and Fugue on a Mixolydian Mode, op. 108, are reflective of his modalism.

It was his political views at the time, and, more specifically, his solidarity with the British left, that prevented his music from being broadcast by the British Broadcasting Corporation. In 1940-41 the left, as a result of its frustration with Britain’s foreign and domestic policies regarding Hitler’s fascist expansionism, created the People’s Convention, of which Bush was a signatory. The BBC ban was levied against all signatories of the Manifesto, which called for friendship with the Soviet Union and a People’s Government. These resolutions did not sit well with those whose colours ran less red than the signatories’, including the Music Department at the BBC.

It wasn’t until Ralph Vaughan Williams, Britain’s preeminent, poster-child composer at the time, pulled one of his commissioned pieces from the BBC in protest that the ban was lifted shortly thereafter. The ban also caught the attention of the House of Commons and Winston Churchill — it was actually discussed in several sessions of parliament ca. 1941. Between the years 1947-1960, however, his music was seldom heard in his own country even though no official ban was in place. It was the German Democratic Republic and the Soviet Union that welcomed him and his music with open arms during this time — no doubt due in part to Bush’s tendency towards Zhdanovaschina, or the doctrine of Socialist Realism that pervaded the USSR’s cultural policy in the 1940s.

Have a listen to the program for more information. CIUT keeps an archive of each program for one week, so it won’t be up for long:

CIUT 89.5 FM NEEDS YOUR SUPPORT! Donate now to keep the station going! Better yet, become a member!

Coursera and University of Toronto Agreement Obtained

notebook with computer mouse

A recent Freedom of Information request to the University of Toronto has given me access to Coursera, a Massive Online Open Course platform (MOOC), and the University of Toronto’s agreement. I have included it here. The file has been maximally compressed so that it could be posted, which has resulted in low quality text.

This document was the basis for an article I wrote in Academic Matters.