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

Formatting errors in table of contents result in generic error message #10385

Closed
zorae opened this issue Jan 24, 2025 · 1 comment
Closed

Formatting errors in table of contents result in generic error message #10385

zorae opened this issue Jan 24, 2025 · 1 comment
Labels
Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed]

Comments

@zorae
Copy link

zorae commented Jan 24, 2025

Problem

OL cannot handle tables of contents that contain three or more pipe characters per line. When trying to save such a malformed TOC, the save fails with the following generic error message:

Sorry. There seems to be a problem with what you were just looking at.

We should at least give an error message that lets the librarian know there was a formatting error in the TOC.

Image

Reproducing the bug

  1. Edit any edition
  2. In the table of contents section, enter the following:
    * 1. | Foreword | Lili Elbe | 4
  3. Attempt to save the edit
  • Expected behavior:
    The page prevents you from pressing the save button and explains that you have to resolve formatting issues in the table of contents.
  • Actual behavior:
    You can press save, but it leads to a generic error message. Any edits you made will be lost unless you navigate back and your browser hasn’t purged the page from its cache.

Context

  • Browser (Chrome, Safari, Firefox, etc): Safari
  • OS (Windows, Mac, etc): iPad
  • Logged in (Y/N): Y
  • Environment (prod, dev, local): prod

Breakdown

Requirements Checklist

  • [ ]

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
@zorae zorae added Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed] labels Jan 24, 2025
@zorae zorae changed the title Formatting errors in table of contents results in generic error message Formatting errors in table of contents result in generic error message Jan 24, 2025
@schu96
Copy link
Contributor

schu96 commented Jan 24, 2025

I think this is a duplicate of #10314

@zorae zorae closed this as completed Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

2 participants