Closed (fixed)
Project:
Commerce Wishlist
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
26 Sep 2011 at 22:29 UTC
Updated:
23 Oct 2011 at 22:30 UTC
Hi,
I got some notices when installed a module and tried to add some products to the wishlist:
Notice: Undefined index: entity funktsioonis commerce_wishlist_add_form_validate() (rida 129 / /htdocs/sites/all/modules/commerce_wishlist/commerce_wishlist.module).
Notice: Trying to get property of non-object funktsioonis commerce_wishlist_add_form_validate() (rida 129 / /htdocs/sites/all/modules/commerce_wishlist/commerce_wishlist.module).
Notice: Undefined index: entity funktsioonis commerce_wishlist_add_form_submit() (rida 153 / /htdocs/sites/all/modules/commerce_wishlist/commerce_wishlist.module).
Notice: Trying to get property of non-object funktsioonis commerce_wishlist_add_form_submit() (rida 153 / /htdocs/sites/all/modules/commerce_wishlist/commerce_wishlist.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'nid' cannot be null: INSERT INTO {commerce_wishlist} (uid, nid, product_id) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => 5 ) funktsioonis commerce_wishlist_add_form_submit() (rida 156 / /htdocs/sites/all/modules/commerce_wishlist/commerce_wishlist.module).Tormi
Comments
Comment #1
fall_0ut commentedHi,
What are the modules you had enabled?
How you created a product display?
Comment #2
Tsuba commentedI also see error in reports when user try add product to wishlist.
Products page generated with Views. I see error only for Views generated pages. In product page no errors.
Comment #3
aristeides commentedI get the same errors...
Comment #4
aristeides commentedAfter seeing comment #1 mentioning a product display, I have to mention that I'm building a site WITHOUT product displays.
All the fields are in the product itself and everything else is handled by views.
The wishlist icon is rendered by views on my product list.
When using product display nodes I don't get these errors, but my use case demands that the store administration is as simple as possible, thus I can't have 2 steps for creating a product. All I can afford in terms of complexity is a single form for new products.
Took a little while to grasp the concept of making everything work without product displays but the end resuld is really rewarding and everything works perfectly.
Comment #5
fall_0ut commentedHi,
On the module commerce wishlist I fixed the code to allow add product when haven't a node display to the product!
Download the last version and execute the update-php
Please test this fix!
Comment #6
aristeides commentedWow, I didn't expect such a quick response....
the results are simply PERFECT!!
Thank you very much!
Comment #7
aristeides commentedMarking as fixed.