Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Product kits
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2011 at 18:38 UTC
Updated:
29 Jan 2013 at 18:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
bancarddata commentedComment #2
bancarddata commentedActually I seem to get this error every time I save a product node as well.
Comment #3
bancarddata commentedThe line it complains about is:
if ($form_state['values']['shippable'] && ($form_state['values']['shipping_type'] == 'small_package' || (empty($form_state['values']['shipping_type']) && variable_get('uc_store_shipping_type', 'small_package') == 'small_package'))) {Not sure what the problem would be with that. The field is definitely set in the database as a 1. for products that are producing this error upon save.
Comment #4
bancarddata commentedAttached is a patch that gets rid of the notice, but I am not sure if it is the correct fix.
Comment #5
tr commentedWhat I wonder is why no one else sees this PHP notice. I suspect it's because a contributed module on your site is causing the 'shippable' key to be lost somewhere. I never see this. Nothing wrong with the patch, but it seems to just hide the notice without correcting the cause. The product form should *always* have a 'shippable' key; that key is defined in uc_product_form().
Comment #6
bancarddata commentedThe main reason I did that in the patch was because I saw the same type of test done in ./payments/uc_paypal/uc_paypal.pages.inc at line 348 and 358 and thought maybe it needed to be in there.
You must be right that it is the fault of a contrib module. The modules that I use that relate to Ubercart are uc_attributes_in_cart, uc_fedex, uc_feeds, uc_tracking, and a small module I made myself that adds an empty cart button to the cart page. Disabling these one at a time along with a cache flush did not seem to affect the notice at all.
Any tips on how I might be able to track down how I am losing the shippable key? Would it have to be something else that is using hook_form_alter on the product_form?
Comment #7
bancarddata commentedI was mistaken. It definitely only happens on Product Kits. It showed up when I saved products only because those products were part of a kit which was also being updated at the same time. Updating the issue as I think this is something I did. Will report back later.
Comment #8
longwaveThis is only a form validation function, it looks like this was one of the many bits of code left over from 6.x-2.x that tests array entries without using isset(). Fix committed.