Skip to content
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

Bug: On bookcover change UI fails to update #624

Closed
mekarpeles opened this issue Nov 1, 2017 · 12 comments
Closed

Bug: On bookcover change UI fails to update #624

mekarpeles opened this issue Nov 1, 2017 · 12 comments
Labels
Module: Cover Service Cover Store (book covers service) Module: JavaScript Issues related to the JavaScript functionality. [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Type: Bug Something isn't working. [managed]

Comments

@mekarpeles
Copy link
Member

When you change a work's bookcover, after submit, the previous cover shows until the page is refreshed

@mekarpeles mekarpeles added the Priority: 3 Issues that we can consider at our leisure. [managed] label Nov 1, 2017
@mekarpeles
Copy link
Member Author

#603

@mekarpeles mekarpeles added easy Module: Cover Service Cover Store (book covers service) labels Nov 1, 2017
@LeadSongDog
Copy link

#628

@mekarpeles
Copy link
Member Author

@LeadSongDog why is #628 relevant to this one?

I think the issue here is javascript related. When a book's bookcover is updated (specifically, I think, on the work page) the UI does not reflect the latest cover

@LeadSongDog
Copy link

@mekarpeles My comment there of Dec 14, 2017 showed similar behavior. The work records show outdated info until the work bookcover is updated. To reproduce this, find any inverted author name such as "Smith, Jane" where that author has a listed work with a cover image. Disinvert the author name to "Jane Smith". The work will continue to show "Smith, Jane". Replace the book cover: (copy, delete, re-add). The work list will now show "Jane Smith".

A similar, but distinct behaviour happens when works are reattributed to a different author record.
I just changed https://openlibrary.org/works/OL9389388W/Prealgebra_-_Math_N_48 to use the main author record. Edition https://openlibrary.org/books/OL10345311M/Prealgebra_-_Math_N_48 now shows the corrected author spelling "McK" in one place, and the old spelling "Mc K" on the cover. The distinction is that the listing of that work under https://openlibrary.org/authors/OL36309A/Charles_P._McKeague is now shown correctly, while the subordinated edition is still wrong:

`

  |
  | Cover of: Prealgebra - Math N 48 by charles p. Mc Keague   |
  |
  |
  |
  | Prealgebra - Math N 48   |     |
  | charles p. Mc Keague   |
  |
  |
  |
  |
  |
  |
  |
  |     | Prealgebra - Math N 48   |     | Close   |
  | Prealgebra - Math N 48 by charles p. Mc Keague   |
  |
  |    

`

@LeadSongDog
Copy link

@mekarpeles
That lead me to examine the twelve code hits for https://github.com/internetarchive/openlibrary/search?utf8=%E2%9C%93&q=%22alt%3D%5C%22Cover+of%3A%22&type=

There are some interesting variations in the way these templates are done. Some hard-code the image height, others the width, others neither. Only four show $_('by') those all being under openlibrary/templates/covers/ and each of those four include class="cover" in the img tag. Some also have itemprop="image" in the img tag.

Do these variations make sense?

@jdlrobson
Copy link
Collaborator

Can I get an update on this since lots has changed? Is this still a problem? Could the description be updated to explain how to replicate?

@jdlrobson jdlrobson added Type: Bug Something isn't working. [managed] Module: JavaScript Issues related to the JavaScript functionality. [managed] and removed easy labels Dec 15, 2018
@jdlrobson jdlrobson changed the title On bookcover change UI fails to update Bug: On bookcover change UI fails to update Dec 15, 2018
@LeadSongDog
Copy link

@jdlrobson The cover at https://openlibrary.org/books/OL10345311M/Prealgebra_-_Math_N_48 still shows a break in the surname, so it clearly is not using live or even recently-cached data.

@LeadSongDog
Copy link

However, a new edit at https://openlibrary.org/authors/OL3351423A/Charles_P._Mckeague?b=2&a=1&_compare=Compare&m=diff was promptly reflected on the cover, so there has been progress.

@tfmorris
Copy link
Contributor

Let's keep search stuff separate and focus issue this in the Javascript bug that @mekarpeles reported.

@LeadSongDog
Copy link

@tfmorris What search stuff?

@LeadSongDog
Copy link

Oh, perhaps I misunderstood @mekarpeles original post. By "page is refreshed" did you intend "browser cache is cleared" or "the served page is refreshed"?

@mekarpeles
Copy link
Member Author

I think this is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Cover Service Cover Store (book covers service) Module: JavaScript Issues related to the JavaScript functionality. [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

4 participants