Hi there. Firstly, thanks for such a great set of modules.
I think I've found a little bug. I created an auctioned product with a starting price and then went back in to edit it. Upon saving (with no changes made), validation failed with the message "Starting price field is required".
After looking into the code it seems that the problem arises from a disabled field being required. It seems that if the product is already currently being auctioned, the real starting price field is turned into a value field rather than a textfield. Then in order to display something to the user, this field is duplicated into 'start_price_disp', which is set as a textfield. Doing this means that 'start_price_disp' is still both disabled and required. I therefore fixed the problem by adding in a single line in uc_auction.module so that the (display) field isn't required:
if ($is_curr_auction) {
$form['base']['auction']['start_price_disp'] = $form['base']['auction']['start_price'];
$form['base']['auction']['start_price_disp']['#type'] = 'textfield';
// Addition line below ensures the form can be submitted
$form['base']['auction']['start_price_disp']['#required'] = FALSE;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | uc_auction-starting-price-1677940-2.patch | 595 bytes | LGLC |
Comments
Comment #1
LGLC commentedI should probably have said that the additional line was added to line 217 (inside
uc_auction_form_alter).Comment #2
LGLC commentedPatch attached.
Comment #3
zegmant commentedThe same problem. Thanks, your patch works
Comment #4
oren102 commentedPerfect.
Thanks for the patch
Comment #5
SeanA commented