I create a shippable product and set price to 'abc' instead of 23.12,
and save ,it show no error.
then I closer to this issue,I found when product node is create , function product_form_validate is not called .
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 55066.patch | 578 bytes | neclimdul |
Comments
Comment #1
oscnet commentedI test with cvs version.
Comment #2
oscnet commentedComment #3
simeThis is critical. It might be ok for other products, but auction.module requires validation to convert the expiry date string to a timestamp. So expiry is set to epoch.
Comment #4
neclimdulI tend to agree, we always want to call the validate hook. Attached is a patch that removes this. Alternatively, if we wanted to leave the check in (for whatever reason) we would change the check to
if (strpos($_GET['q'], "node/$node->nid/edit") !== false). Its cheaper and will work as intended.This doesn't fix Simon's problem however. Product.module uses the _validate, _insert, and _update hooks for triggering the productapi. This is fine except the node's state doesn't seem to be kept between hooks. So after this patch his modifications in validate are still lost. This might be considered a "feature" in core but it causes a problem here. We might look at modifying the product api to fix this or just document that that is the nature of the productapi as I'm pretty sure we aren't going to get any changes into 4.7 core now. *smile*
Comment #5
gordon commentedCommited to cvs.
Comment #6
(not verified) commented