amyjko / bookish

A simple framework for publishing online books.
MIT License
69 stars 14 forks source link

Chapter stuck loading #357

Closed amyjko closed 10 months ago

amyjko commented 10 months ago

When creating new chapters and books, some chapters report being stuck at loading:

image

I investigated a case and the cause was that the ref in the book document pointed to a chapter document that didn't exist, and the chapter document that did exist wasn't pointed to. Somewhere, the chapter text is being disassociated, likely some asynchronous issue caused by book syncing on the client side.

Other hints from Alannah:

All other fields on the page appear to be editable. This chapter was added during the editor meeting yesterday. Though I didn't add any persistent body text at the time, I believe the body was editable then. When I logged into bookish this morning (after a browser quit/re open), the body was no longer editable. There is a chance during the meeting yesterday that I added some placeholder text and deleted it, or accidentally put a space character and deleted it. This is happening for this chapter and one more that I added yesterday during the editors' meeting, but NOT for any of the other chapters that I only added as placeholders after the meeting and did not interact with past changing their titles. For this chapter, I also can't toggle it over to published status by clicking "Forthcoming" on the book home page. Screenshots are before/after click.

Deleting affected chapters and recreate them worked fine.