-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%20 space at end of Internet Archive ID is kept in "Read" url #467
Comments
Can ia simply be trimmed after https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/search/inside.html#L51 ? |
It doesn't make sense to have all downstream consumers have to fix the same problem when it can be fixed at source. The database (and import/update process) should be fixed. |
I have just bot fixed 206 of these ocaids with spaces, which are all the ones I could find from scanning the ol_dump_editions_2017-04-30.txt data dump file. |
@hornc mentions this could be addressed in the importbot backend, i.e. https://github.com/internetarchive/openlibrary/blob/5f10771790799d49b17b85ffba682cc2d1a56084/openlibrary/plugins/importapi/code.py |
Command to find ocaids with spaces in the editions data dump: There are some recent user additions which have spaces in the ocaid. I am going to investigate adding field validation on the UI. |
I have checked for spaces in ocaids again, from the Dec 2017 edition dump. There are 113 ocaids which have spaces anywhere in the string (invalid by definition). unfortunately some are recent additions. The PR above added validation to the edit page, but the Add page works independently https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/books/add.html , and appears to have a different mechanism, so I'm not sure how reusable the approach is :( I overlooked the two ways to get the data in. It would be nice if this validation occurred in one place! |
When an IA ID is added with a space at the end it is stripped from the id in the "ID Numbers" section but apparently is retained in the url linked to the "Read" button. This throws and error rather than taking you to the reader. e.g.:
https://openlibrary.org/books/OL26221263M/Corolla_Sancti_Eadmundi
clicking the "Read Online" button takes you to https://www.archive.org/stream/corollasanctiead00hervuoft%20?ref=ol
Reporter: @JeffKaplan
The text was updated successfully, but these errors were encountered: