The problem is this change:
http://drupal.org/cvs?commit=366426
As seen in uc_product's uc_product_is_product() function, products can actually be any node type returned by the uc_product_types() function, not just 'product'.
I can submit a patch if you like. It would probably involve calling uc_product_types() and modifying the query so it selects nodes with one of those types. However, that does cause at least one extra database query (uc_product_types() invokes hook_product_types(), and uc_product's own implementation calls uc_product_node_info() which does the query), so I don't know which is better - that or the original INNER JOIN.
Comments
Comment #1
bojanz commentedSome people have reported a huge number of products. In that case, a query (or two) more will probably be a lot less expensive then an INNER JOIN.
Weigh the options (maybe even measure the inner join performance), and submit a patch, I trust you on this one.
Comment #2
darktygur-1 commentedYou're right. I probably didn't notice #757414: PHP Out of Memory fixed, but using too much resources to generate product links until after posting this issue. I don't really have time to compare performance, but with a huge number of products, it does make sense to avoid an inner join and go for a quick extra query or two (with less potential to take an increasing amount of time with an increasing number of products).
Comment #3
bojanz commentedLooks good. Committed, thanks.