Skip to content

Label lookups for LCSH mappings are no longer working #1619

@osma

Description

@osma

URL address of the page where you encountered the problem

https://finto.fi/yso/en/page/p14174

Description of the problem

Go to any YSO concept which has a mapping to LCSH (e.g. above URL). The mappings look like this:

image

Instead of the LCSH URI, the label "Labyrinths" should be displayed. This used to work fine but has recently stopped working.

I did some digging and found out the cause.

Skosmos has some custom code (LOCResolver.php) to perform fast HTTP HEAD lookups from LCSH and other LOC linked data sources. Previously, the LOC server has responded with a X-PrefLabel HTTP header containing the preferred label. But now the header is x-preflabel. Skosmos is expecting a specific capitalization style and thus fails to parse the HTTP header.

The fix is simple, just make the parsing code case-insensitive. I will open two PRs to fix this, separately for Skosmos 2 and 3.

Additional information (e.g. screenshots) about the problem

See above

The browser you used when the problem appeared

Firefox

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions