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.

Files: 
CommentFileSizeAuthor
#1 1728242-balance_field_fail_nicely_with_no_order-1.patch888 bytesrlmumford
PASSED: [[SimpleTest]]: [MySQL] 3,589 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new888 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,589 pass(es).
[ View ]

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

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.