Setup a field group with First Name | Last Name | Email
create 4 items so you have

FIRST NAME                LAST NAME                  EMAIL
first1                     last1                    email 1
first2                     last2                    email 2
first3                     last3                    email 3
first4                     last4                    email 4

Edit the fields through the admin interface to remove the third last name and save. You will expectedly end up with:

FIRST NAME                LAST NAME                  EMAIL
first1                     last1                    email 1
first2                     last2                    email 2
first3                                              email 3
first4                     last4                    email 4

Now edit this same node programmatically, just a simple title change will suffice:

  $testnode = node_load(2802);
  $testnode->title = 'my new title';
  node_submit($testnode);
  node_save($testnode);

Now view the node in the admin edit screen and notice that the last names have shifted like so:

FIRST NAME                LAST NAME                  EMAIL
first1                     last1                    email 1
first2                     last2                    email 2
first3                     last4                    email 3
first4                                              email 4

I have attached a png that illustrates this effect as well.

CommentFileSizeAuthor
field-group-bug.png71.54 KBsmoothoperatah
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Status: Active » Closed (won't fix)

You need to be carefull with partial updates, make sure you have fully loaded object before submitting and saving again.