Closed (fixed)
Project:
Extra Fields Checkout Pane
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
29 May 2012 at 19:41 UTC
Updated:
14 Jun 2012 at 17:31 UTC
With Ubercart Addresses 6.x-2.x enabled, when you create a textfield with a default value with Extra Fields Pane, this default value keeps showing up on every address form, overwriting any saved values.
This happens for example:
This is because in the code, the field saved value is only set when there is no default value (± line 80 of includes/uc_addresses.handlers.inc):
$field[$fieldName] += array(
'#default_value' => $default,
);
The Drupal 7 version of Extra Fields Pane is also affected.
A fix will be committed shortly for both 6.x-2.x and 7.x-1.x.
Comments
Comment #1
megachrizFixes for both branches are committed:
Comment #2
megachrizOops, forgot to run automated tests for these fixes. One of the tests in 7.x-1.x is now broken. I'm working on a "fixed" fix. ;)
Comment #3
megachrizFixes are committed for both 6.x-2.x and 7.x-1.x:
An additional fix was added for the 6.x-2.x branch: when creating an order, extra fields with a specified default value were NOT getting a default value on the order edit page. Also, the constant and php string fields were left empty. They now contain a default value when creating the order. I've tested that these fields will not overwrite values of existing orders. Installations that have Ubercart Addresses 6.x-2.x enabled, were not affected by this bug.