I enabled the Book module, but there is no "Book page" content type.
I am using an administrator account with all permissions turned on.
"Add content" (node/add) does not list it, nor does "Content types" (admin/structure/types).
Going directly to node/add/book doesn't work.
The content type is not in the Navigation menu navigation configuration (admin/structure/menu/manage/navigation), although there is a "Books" menu item I can enable.
It does appear in the {node_type} table.
The usual content type permissions do not appear for "Book page", although the four special "Book" management permissions are there.
The Book configuration pages (admin/content/book) pages do appear. I set "Content types allowed in book outlines" to "Basic page" and "Content type for child pages" also to "Basic page".
Disabling, un-installing, and re-installing the module doesn't help.
Clearing the caches doesn't help.
In short, the content type is in the database, but doesn't appear anywhere on the Web site.
Comments
Comment #0.0
DanZ CreditAttribution: DanZ commentedMention permissions.
Comment #1
DanZ CreditAttribution: DanZ commentedI managed to troubleshoot this and get it working. Before I did, the module destroyed my site, and then refused to work after I restored it. There is a lot of room for improvement in the way the Book module handles its content type.
It's related to #1741718: You can't reuse a node_type's machine name after renaming it. There's more to it, though. Here's the full story:
I originally had an Ubercart product type called "book", because my site is a Web store that sells books.
I enabled the Book module, because I didn't know that it set up a new "book" node content type (there is no warning of this). This destroyed the Ubercart installation, since all my book product nodes no longer worked.
By some miracle, I had made a database backup immediately before enabling the Book module. I almost didn't, because I couldn't imagine any harm in enabling a Drupal core module. I restored the backup and Ubercart started working again. I knew that it was the Book module that broke my site.
After much experimenting, I determined that the Book module set up a new "Book page" content type with the "book" machine name. I changed the machine name of the Ubercart product node type to "uc_book", and enabled the Book module. Now Ubercart worked, but the "Book page" content type still didn't appear.
I eventually solved the problem for my site by digging into the DB tables. I discovered that the entry for "uc_book" in the {node_type} table had a field called "orig_type", and this still contained "book". I changed the orig_type value to uc_book, uninstalled the Book module, then reinstalled it, and the problem went away.
Needless to say, this is an unreasonable amount of trouble to come from a Core module. Solving #1741718: You can't reuse a node_type's machine name after renaming it. will help, but the Book module could do a lot to avoid these problems. Some suggestions:
Comment #1.0
DanZ CreditAttribution: DanZ commentednode/add/book doesn't work.
Comment #2
rootworkThis is still an issue, and still seems like an easy fix -- at the very least, we could rename the "book" machine name to "book_page" as DanZ suggested. His second and/or third options would be even better, of course.
Lots of Drupal Commerce sites sell books. Although I'm not a huge fan of the book module anyway, it shouldn't go around destroying other content types if we can help it.
Dan, while I love your original title, I'm changing it for clarity and to see if we can get any love for this a couple of years after you first suggested it.
Comment #5
dpiCan no longer repro
It is visible to me. node.type.book is now optional config.
Comment #6
rootworkCorrecting the reason for closing.
This may still be current in 8.3.x. @dpi the problem wasn't that the book content type doesn't show up when the module was enabled, it's that it doesn't show up when a content type already exists with the machine `book`.
Here's what happens now:
If, when the book module is enabled, a content type with the machine name `book` already exists, the book module essentially "takes over" that content type. Book settings are automatically applied to that content type (book settings can be applied to any type, but they are set automatically here). However, it does not seem to a) modify the existing fields on the content type, or b) prevent access to existing nodes of that content type.
If this is expected behavior, then this is accurately closed, since it no longer breaks the site or causes a loss of data.
Personally I think book module should create a new content type, with a new name, and inform the user that it has done so. But in terms of fixing the critical error, it's true it no longer exists.