internetarchive / internetarchive/openlibrary

Unable to submit new book

Open
#9,914 1 comment 0 reactions 0 assignees View on GitHub
Lead: @scottbarnes Module: Import Priority: 3 Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
126

Description

### Problem

I've come across a book that has two other titles listed as editions ([A Question of Technology](https://openlibrary.org/works/OL26519179W/Question_of_Technology?edition=)), and I've been instructed to create a new book and then move the editions into the new entry. Unfortunately when trying to do this I have repeatedly received an error message.
![Screenshot 2024-09-26 8 11 56 PM](https://github.com/user-attachments/assets/98b9f472-5807-411b-b421-474d9178524f)

![Screenshot 2024-09-26 8 11 25 PM](https://github.com/user-attachments/assets/1b4a6879-e340-4662-b26e-046dc703ba43)
Does anyone have any ideas or a potential solution?

### Breakdown
- [ ] Use `copydocs.py` to copy `/works/OL26519179W` into the local development environment for testing. Ensure all the editions associated with this work are copied in as well (i.e. copy them with `copydocs.py` too if necessary). See https://github.com/internetarchive/openlibrary/wiki/Loading-Production-Book-Data for more.
- [ ] Understand the logic flow for book matching here by adding something like `$if work.type == "work"` before the call to `work.edition_count` here: https://github.com/internetarchive/openlibrary/blob/634240c790734f3a014ca783570e5d68995f9b24/openlibrary/templates/books/check.html#L32, and then trying to import the book as shown in the screenshot. What happens by trying to match a work versus edition?
- [ ] Propose what _should_ happen on this page. E.g. should it only show works? Should it only show editions? What would make this page useful for limiting duplicates? That will partially depend on the step above by looking at the code that runs from `check.html` to see what is _meant_ to be happening.

Contributor guide

Open the contributing guide

Research direction

Load /works/OL26519179W and its editions with copydocs.py, then inspect openlibrary/templates/books/check.html around the work.edition_count call. Trace the matching flow for works and editions and determine what this page should display to limit duplicates. Done means documenting the expected behavior and a concrete direction for resolving the submission error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.