Fresh install of this version of commerce kickstart...
1. Create view of type 'product display'
2. Set relationship to referenced product field
3. Set various fields from referenced content
4. Save view
Get following errors on views edit page:
Notice: Undefined index: node in views_handler_field_field->access() (line 127 of /home/quickstart/websites/regck.dev/profiles/commerce_kickstart/modules/contrib/views/modules/field/views_handler_field_field.inc).
and
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS node_, node.created AS node_created, '' AS field_data_commerce_price__entity_' at line 1
When trying to view the view I get the following errors:
Notice: Undefined index: node in views_handler_field_field->access() (line 127 of /home/quickstart/websites/regck.dev/profiles/commerce_kickstart/modules/contrib/views/modules/field/views_handler_field_field.inc).
Notice: Undefined index: node in views_handler_field_field->query() (line 186 of /home/quickstart/websites/regck.dev/profiles/commerce_kickstart/modules/contrib/views/modules/field/views_handler_field_field.inc).
Notice: Undefined index: entity keys in views_handler_field_field->query() (line 198 of /home/quickstart/websites/regck.dev/profiles/commerce_kickstart/modules/contrib/views/modules/field/views_handler_field_field.inc).
Comments
Comment #1
drupalreggie CreditAttribution: drupalreggie commentedShould mention I have installed Superfish menu and added my own theme also.
Comment #2
FranciscoLuz CreditAttribution: FranciscoLuz commentedThis issue here #1909046: SQL Query syntax error when adding a Content: Product variations field into a view may or may not be related.
Comment #3
jsacksick CreditAttribution: jsacksick commentedI just tried to reproduce the issue following the steps in #1 and everything went fine, copy/paste your views export here and I'll try to reproduce your issue, I can't do anything if I can't reproduce it.
Comment #4
FranciscoLuz CreditAttribution: FranciscoLuz commentedSteps for reproducing it:
Comment #5
jsacksick CreditAttribution: jsacksick commentedI just tried again, you don't need the relationship to add the product variations field, the error appears when selecting a relationship for that field indeed, but it's not needed... Try without the relationship and it should work.
Comment #6
FranciscoLuz CreditAttribution: FranciscoLuz commentedRight, I see.
In my scenario I have a content type that has 2 product reference fields. I have to create 2 relationships in order to tell product variations field which one it should load.
You are right though, having only one product reference field into the content type and setting the variation field into views without a relationship works.
But having more than one product reference field into the content type and setting the variation field into views without a relationship WONT work either.
You MUST have only one product reference field into your content type other wise it WONT work.
Comment #7
bojanz CreditAttribution: bojanz commentedLooks like you found your answers.
The original issue sounds odd because it mentions using "Product Display" as the base which is our Search API index, which doesn't have or support relationships. The right base table to use in that case would be "Node".