When create custom content type through UI or programmatically in Drupal 7, there is no link is listed in the Content > Add content.

I was creating the content types without any trouble, but now it is created(succes message is showing) when I check them in the node_type table but not lising in the admin/structure/types.

But no content type is listing(not any links showing) in the Content > Add content, or Structure > Content type administration menu.

Here is the code that allows users to access node pages:

 * Allow users to view the contents
function mymodule_node_access_records($node){
    $grants = array();
    $grants[] = array(
        'realm' => 'example_realm',
        'gid' => 123,
        'grant_view' => 1,

  'grant_update' => 0,
    'grant_delete' => 0,
    'priority' => 0,
return $grants;

 * Implements hook_node_grants().
function mymodule_node_grants($account, $op){
    $grants = array();
    if ($op == 'view') {
        $grants['example_realm'] = array(
    return $grants;

Then I rebuild permissions using Content Access module.

  • Iv'e only had this issue right after I create one and a page refresh fixes it. Could it be perms perhaps?
    – sareed
    Commented Jan 6, 2015 at 15:07
  • have you emptied the cache ?
    – rtome
    Commented Jan 6, 2015 at 15:12
  • I am hanging with this for 5hrs(min). It would not be that easy to count the cache operations. @rtome: Thank you for your comment anyway. Commented Jan 6, 2015 at 15:23
  • are you using any cache other than default core cache? Say Authcache or Memcache.
    – hkoosha
    Commented Jan 6, 2015 at 16:11
  • also manually check this path, is it a 404? 403? 500? yourdomain.com/node/add/MACHINE_NAME where MACHINE_NAME is the machine name (doh!) of the node type you created.
    – hkoosha
    Commented Jan 6, 2015 at 16:12

1 Answer 1

  1. Check the permission for node creation of that type in admin/people/permissions
  2. Clear all caches and retry and it should be OK
  • May be you are getting to the point. But how is it possible to -"check the permission for node creation of that type", when I am going to create a new type? Commented Jan 6, 2015 at 15:28
  • @usermesam0023 check the permission of the one you already created but has disappeared. It's listed in the permissions list as 'create new node of type XYZ'.
    – hkoosha
    Commented Jan 6, 2015 at 16:09
  • Also, try to access directly this link node/add/your-new-type Commented Jan 6, 2015 at 16:28
  • @nabil: I have posted this question after I tried all these possibilities. When I go this path: I get the same 'Add Content' form. Commented Jan 6, 2015 at 16:43
  • Now I am running the site with the single 'Administrator'(allowed all permissions) and other users(anonymous). I have allowed these anonymous users to access all my node contents. Now I am going to add this code to my question. Commented Jan 6, 2015 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.