internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.18k stars 1.35k forks source link

Adding authors to works sometimes fails on "expected /type/author, found /type/redirect" and edits are lost #9930

Open bilch opened 3 weeks ago

bilch commented 3 weeks ago

Problem

Some books (e.g. anthologies) have lots of authors. When I've added many authors to a work and try to save, the save sometimes fails on the error message "expected /type/author, found /type/redirect". All edits are lost, and the error message doesn't say which author caused the problem.

Reproducing the bug

I believe this might be reproduced by

  1. adding an author to a work (but not saving yet)
  2. merging this author with others
  3. and only then saving the work that the author was added to.

(Although it happens in other cases, too. This is merely what I think might be easiest to reproduce.)

Context

Breakdown

Minimal solution: Take me back to the edit page in such a way that my edits are not lost. Would be nice to have: Tell me which author is causing the problem.

Requirements Checklist

Related files

*

Stakeholders

*


Instructions for Contributors

seabelis commented 3 weeks ago

This is a result of unresolved redirects. The same problem that causes some merges to fail.