Currently the Views field handlers for Commerce Orders that generate links to orders (view/edit/delete) don't validate if there is an order id, they just presume it is there and generate a link.

I use a View of entities that can reference orders, but the View currently always shows a link even if there is no referenced order in the entity (the generated link is ofcourse broken and gives a 404 page).

I will attach a patch that checks if a order_id is known, and only then generates a link.

Len

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lendude’s picture

Here is the patch

rszrama’s picture

Hmm, is there something we should be doing w/ the empty value settings instead?

Lendude’s picture

The way it works with the #1 patch is that if no order_id is found the field render comes back empty so Views just falls back to it's normal 'empty' behavior. So if you enter an 'empty text' in the field settings that text will be shown instead of nothing. So these settings are used.

Or are you thinking in another direction?

rszrama’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Issue tags: +sprint