If you build a view where the Order is loaded through a relationship that is not required and add the 'Order Balance' field, the rows without orders will cause 500 errors and stop the site from working at all.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rlmumford’s picture

Status: Active » Needs review
FileSize
888 bytes

Here's a patch that solves the immediate problem. I don't know if there should be a check that comes before this.

rszrama’s picture

Status: Needs review » Fixed

When checking to ensure we have an order, I also like to load the order and ensure a valid order was returned in case the order ID no longer exists for some reason. I also noticed this code could be better optimized, though, so I shortened the function and changed the output of the "raw" display format to match the raw format for price fields.

Commit: http://drupalcode.org/project/commerce.git/commitdiff/b3c349b

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.