I'm getting several errors when adding a product field to a product view. After refreshing the view and saving, the view page shows this error "Notice: Undefined index: commerce_product in views_handler_field_field->query() (line 79 of /var/aegir/platforms/dev/sites/all/modules/views/modules/field/views_handler_field_field.inc).". Steps to reproduce:
- Create a sample product
- Create a product view
- Add fields, including 'fields: product'.
- Preview should throw and/or view page should show an error.
Comments
Comment #1
pcambraOrigin of the problem comes from the views_data_alter from commerce_product_reference module:
We need to check the base table or the relationship tables to make sure that the Field:product doesn't show up in the commerce_product based views, only in line_items and product display ones.
Comment #2
pcambraReplaced hook_views_field_data_alter for hook_views_field_data
https://github.com/pcambra/drupalcommerce/commit/ef81e177ea4751a137811b0...
Comment #3
rszrama commentedI can't see any problems with the patch... it appears to be working fine in the capacities it's currently being used. It may be adding stuff to the delta fields of these references, but I don't know how to check that or what the side effects would be if it's incorrect. : ?
The original report has been satisfied, so I'm marking this one fixed.
Comment #4
jlporter commentedDid this ever get commited? I tried the -dev release and still no dice.
Comment #5
rszrama commentedYeah, the patch was committed and should be in -dev. You can always search for the function name in your commerce_product_reference.module file.