I noticed this when using addressbook with Commerce 1.9 and dev. Here is probably the best way to reproduce this:
1) Make a user role that has edit/view own and create shipping and billing
2) Install addressbook
3) Have the user make two billing profiles (one will become default)
You will see that the non-default one does not show in the second addressbook view on the addressbook tab.
For whatever reasons, Views is doing this join pattern:
commerce_customer_profile -> LEFT JOIN -> commerce_addressbook_defaults -> INNER -> commerce_customer_profile
commerce_entity_access_query_alter is choosing the second commerce_customer_profile table as the alias for "base_table". Thus for any rows where the first LEFT JOIN found no key in commerce_addressbook_defaults, the ownership conditions that commerce_entity_access_query_alter puts in will cause the row to get left out.
I have attached a patch to fix.
Comment | File | Size | Author |
---|---|---|---|
fix_wrong_base_table.patch | 1.26 KB | dpolant | |
|
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedTagging for http://contribkanban.com/#/board/commerce/7.x-1.x.
Comment #2
rszrama CreditAttribution: rszrama at Centarro commentedJust a quick note: we've had a release of the Addressbook module since this issue was reported, so if you can't reproduce the issue with the latest version, consider testing with a prior version.
Comment #3
lisastreeter CreditAttribution: lisastreeter at Centarro commentedUsing the latest version of commerce_addressbook, I could not reproduce the bug.
I then tested with the version active at the time this issue was created: 7.x-2.0-rc7, dated 5/19/2013 and was able to reproduce the bug exactly as described.
Since this bug no longer exists with the latest release of commerce_addressbook, it can be closed.