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

Front/back matter and numberless chapters without titles can't be accessed from ToC #843

Open
richard015ar opened this issue Aug 26, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@richard015ar
Copy link
Contributor

richard015ar commented Aug 26, 2021

Description

When a back/front matter is created with an empty title, or a numberless chapter is created without a title, is not possible to click and access to it in the Contents menu or contents list in the book's home page.
See:
Screenshot from 2021-08-26 08-10-42
Screenshot from 2021-08-26 08-10-26

Steps to Reproduce

  1. Add a back and/or front matter with an empty title
  2. Go to the main page of the book and try to access to it. You should not be able to access to it.
  3. Go to any chapter and go to the top-left content menu and try to access to the back or front matter created in the point 1. You should not be able to access to it.

Expected behavior: Does not allow to create back or front matter with empty title, or add an access to the menu and contents list.

Actual behavior: An empty item in the menu and in the contents list is created, without any link to access to the content.

@SteelWagstaff SteelWagstaff added the bug Something isn't working label Sep 1, 2021
@SteelWagstaff SteelWagstaff changed the title Front & Back matter empties Front/back matter and numberless chapters without titles can't be accessed from ToC Sep 1, 2021
@SteelWagstaff
Copy link
Member

See https://wordpress.stackexchange.com/a/65274/130805 for one possible approach.

@SteelWagstaff
Copy link
Member

Proposed solution: add a pre-update/save check to require a title. If one is not present, display an error message 'This content could not be saved without a title.' and focus should be moved to the title field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants