Title of imported files are not updated until you edit the chapter or enter a different chapter
The title of an imported file is the name of the file, until you go inside the chapter and then the title is updated based on the content of the file that has "Heading 1". Also in the TOC the title of chapters are shown as what the name of the files are, but going to that chapter in the Preview, you will see as the title the content that has "Heading 1".
Expected behavior
Title of chapters should match in TOC page and in the content of the book.
Current behavior
In the book below, I have uploaded a file Chapter 3.docx
in the producer page which is the only chapter of the book. In TOC this is also the title of the chapter, as in the screenshot below.
But going to chapter 1 in the book, the title is "This is chapter 2" which is the content in Chapter 3.docx
that has the "Heading 1".
You can also check in the left panel in the producer page that the title of the chapter is firstly the name of the file, and when you click the chapter, the title will be updated. For files that don't have any content as Heading 1, the title will be updated to "Untitled Chapter" and in preview as "chapter".
Steps to reproduce
- Create a book by clicking "Start writing your book" in the Dashboard
- Upload a file by clicking the button at the left panel and wait until it's processed. Don't click the file
- Go to "Preview & Export" and check that the title of the chapter in TOC page doesn't match the one in the content of the book
- Same thing happens also if you create book through "Import files" - the titles of the chapters will be the name of those files until you click inside the chapters
Environment
[Provide browser name and version and if you're working from a PC or Mac]
Possible solution
When the chapter is opened, send the chapter title