Core Content types not available

旧时模样 提交于 2019-12-10 18:04:41

问题


I have a weird issue troubling my Drupal site. Upon clicking 'Add Content', my Drupal website automatically redirects to a couple of custom content types that I created using the 'Add content type' feature. For some reason, all the existing core content types such as 'Basic page', 'Article', 'Book' have disappeared.

Further probing, when I click the 'Content types' link in 'Structure>Content types', all of these content types exist and are listed, however for some reason I am unable to use them.

I am not sure where I have goofed up here, so I want to ask you guys and check what's wrong.

Thanks,


回答1:


Problem:
I have experienced this same problem... in fact on a current project I lost a complete day of work (I wasn't backing up my DB often enough & my fix was to restore my DB) in attempt to resolve it. Once I found Radix's answer I realized that was definitely what I had just done (disable all of those items in the navigation menu).

Procedure/Fix:
I then took it one step further, since, in my estimation putting these links in the navigation menu must have been an error (what business do they have there??). I went to Structure->Menus and clicked the "list links" errr link. Next I clicked the "edit" link on the Add content sub-menu item. In the Edit window I selected the ----Content sub-menu of the Configuration menu.

I then verified that clicking Add content from the management menu AND from the Content window brought me to the links I was expecting, and it did.

Drawback:
I found that when adding new content types you have to modify their automated menu link by finding them under the navigation menu & setting their parent menu as ------ Add content

Summary:
Moved the Add content menu to a more logical location (so I could use the navigation menu for my own purposes without losing the ability to add content), however this requires an extra step when creating custom content types.




回答2:


This issue has been asked in several formats, but as it keeps rearing its head, I will respond with a detailed explanation.

When attempting to "Add content" under administration-->Content, it is quite common to find that the content type menu items become disabled (don't know why). This can easily be remedied by re-enabling the content types in the navigation menu, like this:

Go to administration-->structure-->menus-->navigation and you will see all (or some) of your content types are disabled in the menu. Just re-enable them and you are good to go!




回答3:


This may also be due to problem with the database: If two or more entries in the node_type table have the same orig_type value, some of them may not be displayed. Compare this report: Drupal: Content type in database not in the list of content types in Structure>Content types



来源:https://stackoverflow.com/questions/8921810/core-content-types-not-available

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!