The node_type_set_defaults documentation says:

When populating a custom node type $info should have the 'custom' key set to 1.

However, in node_example.install, the array doesn't have a custom value set.

  $node_example = array(
    'type' => 'node_example',
    'name' => $t('Example Node'),
    'base' => 'node_content',
    'description' => $t('This is an example node type with a few fields.'),
    'body_label' => $t('Example Description')
  );

Not sure whether I am misreading the docs or if this is just a minor oversight.

CommentFileSizeAuthor
#3 examples_node_type.patch634 bytesilo

Comments

mile23’s picture

Wow that documentation is a vague mess. It looks as if the node module sets 'custom' => 1 for it's modules that have user-generated fields, but it's unclear from reading the documentation or the code.

ilo’s picture

ilo’s picture

Status: Active » Needs review
StatusFileSize
new634 bytes

Putting 'custom' to TRUE so it can't be deleted from the UI, and leaving locked as default (also TRUE).

dave reid’s picture

Version: » 7.x-1.x-dev
rfay’s picture

Status: Needs review » Fixed

Thanks so much!

Committed.
D7: 5728d31
D8: bd03c15

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.