Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I went to edit the module's views I get this message:
> Status message
This view has been automatically updated to fix missing relationships. While this View should continue to work, you should verify that the automatic updates are correct and save this view.
The commerce_rec_product_display is not showing any relationships, but from the code I can see it ought to have one to Content: Referenced product.
Comment | File | Size | Author |
---|---|---|---|
#3 | commerce_rec_fix_views_relationship.patch | 3.44 KB | Frando |
Comments
Comment #1
dwkitchen CreditAttribution: dwkitchen commentedIt must be dependant on some other module not in the info file probably something in commerce kickstart (are you using it?) as that is what I was testing it on.
Comment #2
joachim CreditAttribution: joachim commentedNope, I don't have commerce kickstart. But I probably have most of the modules in it.
Ah got it:
> $handler->display->display_options['relationships']['field_product_product_id']['id'] = 'field_product_product_id';
That's presumably the field made by the CK installation process. Whereas without CK you're making one of those by hand (IIRC -- at least, on my site it's got a custom machine name I gave it).
It might be feasible to fix this by sniffing product ref fields on nodes and defining the relationship programmatically. Or by saying in the docs this has to be added by hand.
Comment #3
Frando CreditAttribution: Frando commentedAfter some struggling I got commerce_rec to work.
1. Install recommender-7.x-4.0-alpha4 (most recent release)
2. Apply the patch in https://drupal.org/node/1611716#comment-6105088 to recommender
3. Install most recent dev of commerce_rec-7.x-1.x
4. Apply the attached patch to commerce_rec
The attached patch fixes the relationships in the default product similarity view shipped commerce_rec.