This error occurs in 7.4.30 stable and 7.4.34-stable (demo site). After editing a field on a dataform the field name is renamed (i.e., incremented it a number, field, field1, field2, field3). This is mainly a pain, however, it isn't right and if you happen to modify one of the critical mail related fields the mail feature will not work because the field is no longer named properly. I believe this is the same error called out in:
http://www.plainblack.com/bugs/tracker/dataform-mail-broken-after-edit-email-fields#dtO6Wki6f6TAQfdyJLqiSg
I wonder if the fix to this bug:
http://www.plainblack.com/bugs/tracker/dataform-overwriting-fields#mqrWJWib4TM3EOYwDjPIJw
introduced the new problem.
I looked at the code and I do believe it was broken in Revision 5741. I think this fixes the problem:
*** DataForm.pm.orig 2008-05-06 20:49:45.000000000 -0400--- DataForm.pm 2008-05-06 20:51:04.000000000 -0400****************** 1071,1076 ****--- 1071,1077 ---- my $exists = 1; while ($exists) { $exists = $self->session->db->quickScalar('SELECT DataForm_fieldId FROM DataForm_field WHERE assetId=? AND name=?', [$self->getId, $name]);+ if ($exists == $form->process("fid")) { last ; } if ($exists) { $name =~ s/(\d+|)$/$1 + 1/e; # increment number at the end of the name }
The change exits the field rename loop if the field with the same name is the same field that is being edited. Let me know if you need me to commit the change.
Eric
Fixed for 7.4.36.