Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As in http://drupal.org/node/441142
If you use CCK to 'manage fields' and drag the 'body' around anywhere (or make any change at all AFAIK) there's a good chance that the form 'weights' set when form_alter added its field will become totally nonsensical.
the node type switcher bubbled to the top of my form. above even the title. Not much fun.
The fix is eventually to make the contrib field show up on the node type field management screen like so:
/**
* Implementation of hook_content_extra_fields.
*
* Information for the positioning of non-CCK contrib fields
* @see content_extra_field_weight()
*
* CCK scrambles the node edit form when the 'body' is repositioned. Allow the
* CCK UI to fix that and place the widget where you want.
*/
function nodetype_content_extra_fields($type_name) {
$extra = array();
if (! user_access('change node types')) {
return;
}
$extra['nodetype'] = array(
'label' => t('Node Type'),
'description' => t('Node Type Switcher'),
'weight' => 10,
);
return $extra;
}
No patch - just paste it into the bottom of nodetype.module if you want.
Comment | File | Size | Author |
---|---|---|---|
#1 | 441172_cck_extra.patch | 1.04 KB | andypost |
Comments
Comment #1
andypostAnd here the patch
Comment #2
vickey CreditAttribution: vickey commentedHello,
When you are changing weight of CCK field then clear related entries in cache_content table so that we can see the changes.
otherwise use nodeformcols mdoule to change order of cck field.