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.

CommentFileSizeAuthor
#1 441172_cck_extra.patch1.04 KBandypost
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

FileSize
1.04 KB

And here the patch

vickey’s picture

Hello,

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.