Skip to content

Burmese bib project: duplicate cells issue #1065

Description

@jmavescodex-arch
  • Problem: A recurring “Duplicate cells found” error page in the editor blocks the Burmese team from accessing verses, creating a loop that halts translation progress.
  • Context: All Burmese team members see this overlay in the Burmese project, and it reappears immediately after navigating back to the chapter. Unclear checkmark/X prompts prevent resolving the issue, leaving them stuck.

Description

Some books show a "Duplicate cells found" screen instead of the chapter text. This happens because a few section-heading cells got copied — the file ends up with two identical cells that share the same ID.

The cause is the migration that gives every cell a unique ID. It creates each ID by hashing the old ID, so the same input always produces the same output. If a heading already exists twice in the file (once with an old-style ID, once already
converted), running the migration again turns the old one into the exact same ID as the converted one — so now there are two identical cells.

This shows up mostly in Genesis, Exodus, Leviticus, Numbers, and Deuteronomy, because those books have section headings that went through this conversion.

Steps to Reproduce

  1. Open a freshly cloned/synced copy of the project (so migrations run again).
  2. Open an affected book, e.g. DEU.codex.
  3. Click forward in the chapter navigation to the first chapter with a duplicated heading (Deuteronomy 3).
  4. The "Duplicate cells found" screen appears instead of the chapter.

Expected Behavior

  • Running the ID migration never creates two cells with the same ID.
  • If a heading already exists in both old and new ID form, the migration keeps just one copy.
  • Every chapter opens normally.

Actual Behavior

  • The migration gives the old-style heading the same ID as the already-converted one, creating an exact duplicate.
  • Nothing cleans this up afterward, so the duplicate gets saved and synced.
  • The editor blocks the chapter with "Duplicate cells found".

Acceptance Criteria

  • The ID migration checks for existing IDs and never creates a duplicate; if the new ID already exists, it merges into that cell instead.
  • Running the migration twice on the same file produces no duplicates.
  • Merging two copies keeps all edit history (no data loss).
  • Already-affected books (GEN/EXO/LEV/NUM/DEU) are repaired.
  • Opening any chapter no longer shows "Duplicate cells found".

Test Checklist

  • A file with a heading in both old and new ID form ends up with one cell after migration.
  • Running the migration twice changes nothing the second time.
  • The surviving merged cell keeps its edit history and validations.
  • A file that's already fully converted is left untouched.
  • After repair, navigating every chapter of GEN/EXO/LEV/NUM/DEU shows no duplicate screen.
Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions