Closed (fixed)
Project:
UC Discount Framework
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2009 at 08:32 UTC
Updated:
3 Jun 2009 at 15:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
henrrrik commentedI've found a couple of problems in
uc_discount_condition_node_term()in uc_discount.ca.inc.taxonomy_node_get_terms()fails on$nodebecause$nodeisn't a fully populated node object in this context and$node->vidis empty. Anode_load()solves this, but I assume real problem is located in ca.module.array_intersect()fails if there's only one term. However,is_array()only returns a bool result, not the term id. I replaced it with this:Comment #2
Island Usurper commentedI want to avoid doing node_load() in condition and action code, because they might be used during a View's construction. Doing all those extra node_load()s would be too big a performance hit. That said, I've resorted to using a database call anyway to get the $node->vid if it isn't there. Hopefully that won't be too bad.
It's also a lot easier just to force $terms to be an array than to do different things whether it is or not.
Comment #3
Island Usurper commentedCommitted, since I haven't heard anything back.