Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Order
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2012 at 14:10 UTC
Updated:
18 Oct 2012 at 06:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
pounardSVN patch attached (sorry no GIT from here).
Comment #2
pounardSorry, wrong patch attached, here is the right one.
Comment #3
rszrama commentedI've committed the fix. I see what you're saying about putting the token in commerce_order.tokens.inc, but I'm undecided. The problem is we need to conditionally make the token available in hook_token_info() - I suppose we could do this by checking to see if a module implements hook_commerce_order_uri() and making it available if any does. But it's still less than perfect - what should we do if no valid URI is returned? Should the token be empty, potentially breaking its usage in some links?
I'm up for ideas; I'm going to mark this bug report fixed for now, though, and we can consider moving it separately if need be. At least as it stands we can be assured of a fallback URL.
Comment #4
pounardI see what you mean, you don't want to provide the token if there's no way to have a URL. Your solution of exposing it if no modules implements the hook_commerce_order_uri() sounds fine. I have no strong fealings about this.