internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.24k stars 1.38k forks source link

Leading articles ("A") elided from titles in author works list #7758

Open tfmorris opened 1 year ago

tfmorris commented 1 year ago

I think this started happening relatively recently. The leading "A" of work titles is getting dropped in the listing of works on an author's page. This appears to just be a rendering issue because the JSON data https://openlibrary.org/authors/OL2240495A/works.json and the work page are both correct.

Evidence / Screenshot (if possible)

Screen Shot 2023-04-03 at 8 29 56 PM Screen Shot 2023-04-03 at 8 30 18 PM

Relevant url?

https://openlibrary.org/authors/OL2240495A/works.json https://openlibrary.org/authors/OL2240495A

cdrini commented 1 year ago

How odd.... the same thing appears to be happening on the search page:

https://openlibrary.org/search?q=memoir+on+the+phylogeny+of+the+jaw+muscles+in+recent+and+fossil+vertebrates&mode=everything

But the JSON is correct https://openlibrary.org/search.json?q=memoir+on+the+phylogeny+of+the+jaw+muscles+in+recent+and+fossil+vertebrates&mode=everything&fields=key,title,editions

cdrini commented 1 year ago

The rendering code itself looks straightforward:

https://github.com/internetarchive/openlibrary/blob/556534ffe5f55f4ae28524ce497db77fdbc73c0d/openlibrary/macros/SearchResultsWork.html#L29-L33

The bug must be higher up in the stack

tfmorris commented 1 year ago

I've also seen it drop the leading article "the", but today the example above is rendering correctly for me, so I'm not quite sure what to make of it. This wasn't a one time issue though. I've seen multiple examples over the course of more than a week.