openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Author page failing to render due to AttributeError (data problem)

Open mekarpeles opened this issue 7 years ago • 5 comments

Description

Author page failing to render because something is wrong with rendering their book list(s) -- suspecting one of their books erroneously has multiple authors instead of an author field (?)

https://openlibrary.org/authors/OL6598895A/Horst_Kurnitzky?debug=true

Evidence

https://openlibrary.org/authors/OL6598895A/Horst_Kurnitzky?debug=true

Expectation

author page should be correctly displaying

Proposal & Constraints

We should fix the macro template openlibrary/macros/SearchResultsWork.html (not the author metadata record) so it's robust against the problem we're facing

Stakeholders

@mekarpeles, @JeffKaplan

mekarpeles avatar Jan 24 '19 19:01 mekarpeles

The second author listed: https://openlibrary.org/authors/OL7169223A.json for the work: https://openlibrary.org/works/OL16802242W.json is corrupt and needs to be deleted.

tfmorris avatar Jan 25 '19 00:01 tfmorris

Oops, just noticed your proposed fix buried in all the boilerplate. Sorry I destroyed your test case!

tfmorris avatar Jan 25 '19 02:01 tfmorris

@mekarpeles @tfmorris @JeffKaplan Is there another test case to confirm that this is still an issue?

xayhewalo avatar Nov 04 '19 23:11 xayhewalo

I've reverted my edit and broken the author page again so that the code can be fixed properly.

tfmorris avatar Nov 24 '19 19:11 tfmorris

This looks like the same root cause that breaks several other things on the site (a few more are listed in #3695), which is an assumption that all author entities will have a 'name' field. It seems like we should re-scope one of these issues to include a checklist of places where that assumption is made so someone can work through them all and then close the other issue as a dupe of the larger one.

SouthGoingZax avatar Oct 25 '20 16:10 SouthGoingZax