New modules which define more than one content type are supposed to prefix the names of $node->type with the name of the module.

This I have done for the 'address' type of my cvbuilder module.

Everything works just fine, except Drupal silently enters the wrong value into the type field in the node table, truncating it at 16 characters. End result: nodes cannot be edited, and theme() functions have no effect on them.

Just wasted 2 days of my life tracking this one down.

Suggested change: ALTER TABLE node MODIFY type varchar(64);

You may consider 64 to be too long. Fair enough. But 16 is *way* too few for modules which define multiple node types.

Comments

handelaar’s picture

Also required for this to unfail:

ALTER TABLE vocabulary_node_types MODIFY type varchar(64);

[Thanks to JonBob for that catch]

jonbob’s picture

Category: bug » task

A big +1 for this. CCK is pretty constrained by the current limit, as "content-" takes up half the available field. 32 would be nice.

magico’s picture

Version: 4.6.3 » x.y.z
Category: task » feature
Status: Active » Fixed

In the HEAD was modified to 32.

Anonymous’s picture

Status: Fixed » Closed (fixed)