plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
Dataform renames field names after edit  (#3771)
Issue

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.

 

Solution Summary
Comments
ekennedy
0
5/6/2008 8:46 pm

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

Graham
0
5/7/2008 2:44 am

Fixed for 7.4.36.

Details
Ticket Status Closed  
Rating0.0 
Submitted Byekennedy 
Date Submitted2008-05-04 
Assigned To unassigned  
Date Assigned2010-09-02 
Assigned By 
Severity Minor (annoying, but not harmful)  
What's the bug in? WebGUI Stable  
WebGUI / WRE Version 7.4.34-stable  
URLbugs/tracker/dataform-renames-field-names-after-edit
Keywords
Ticket History
© 2010 Plain Black Corporation | All Rights Reserved