If nothing is provided for estimated cost or quantity requested, the code is trying to set them to reasonable defaults for preview and submission (cost to 0, quantity to 1) in wishlist_validate, but the values aren't really being changed. The values remain blank and are submitted as such.

When I change the POST to GET for the form, I see the following in the URL (demangled here for ease of reading):

edit[item_est_cost]=
...
edit[item_quantity_requested]=

I've been able to work around it a bit for now by adding defaults to wishlist_form.

Comments

scott.mclewin’s picture

Status: Active » Fixed

Thanks for pointing this out. That logic worked in 4.6, where the validation function could modify the node as it was being saved. It does not work under 4.7, but I didn't know any better when I ported the module. FAPI was too new to me.

Another bug you led me to was the fact that 'private' items were not setting the published status to 0 and were seen across the entire site.

I've fixed both.

The private items by setting that value on the update and insert hooks, and the default values by not being so 'nice'. Now forgetting to fill out a value gets an error message rather than a silent correction to a reasonable value.

This is fixed in head, which is currently 4.7 compatible. I'll merge it into the formal 4.7 branch before I begin D5 porting.

Anonymous’s picture

Status: Fixed » Closed (fixed)