bookwyrm icon indicating copy to clipboard operation
bookwyrm copied to clipboard

'Unshelving' a book is not working correctly

Open franbarra opened this issue 2 years ago • 1 comments

Describe the bug A book (currently shelved) that is unshelved through the search interface leads to a "Not Found" error.

To Reproduce Steps to reproduce the behavior:

  1. Search for the (already shelved) book through the search bar.
  2. Click on the book you have shelved.
  3. From the left-hand side dropdown menu, choose the option "Remove from xxx" where xxx can be the shelf "To Read", "Read", etc.
  4. "Not Found" error appears and the book isn't unshelved.

Expected behavior A book currently shelved, and its subsequent unshelving, should remove the book from the shelf it was previously on.

Screenshots dropdown menu

not found error and url

Instance bookwyrm.social

Additional context Add any other context about the problem here.


Desktop (please complete the following information): - OS: ArchLinux - Browser: Mozilla Firefox - Version: 102.0

franbarra avatar Jul 02 '22 19:07 franbarra

I think this will be solved by #2195

mouse-reeve avatar Jul 07 '22 20:07 mouse-reeve

Hello @mouse-reeve.

I’m trying to add this book again to my “To Read” Shelf and hit the same error.

I think this will be solved by #2195

arkhi avatar Nov 26 '22 20:11 arkhi

I'm still experiencing this bug on 2c5811fb6fe70ae7f5de28c0741138c688377aa4

Steps to reproduce:

  1. Navigate to /book/30369/s/anxious-people
  2. Attempt to remove from "To Read" list

image

Result:

  • Redirects me to /unshelve/ and displays "Not Found" message
  • The book is also not removed from the "To Read" list

Logs:

bookwyrm-web-1 | Not Found: /unshelve/ bookwyrm-nginx-1 | [ip address] - - [19/Dec/2022:08:38:57 +0000] "POST /unshelve/ HTTP/1.1" 404 14431 "/book/30369/s/anxious-people"

I've checked the database, and the book has been removed from bookwyrm_shelfbook (there is no row where book_id=30369) , but the frontend still appears to think it's in the "To Read" shelf (see screenshot below):

image

EDIT: after I restarted the server the frontend no longer thinks the book is in the "To Read" shelf

hueyy avatar Dec 19 '22 08:12 hueyy

I've noticed that the frontend still shows these books on their old shelve (happens as well when moving a book to a different shelve). I believe there are probably two bugs, one with the Not Found page and the other has to do with the redis panel caching not being busted after changing the shelve of a book.

chdorner avatar Dec 19 '22 09:12 chdorner