Well, they are -- if the "Use aliased URLs in support notification emails" setting is disabled after first being enabled. Here's why:
'!ticket_url' => url("node/$nid", array('absolute' => TRUE, 'language' => $language, 'fragment' => "comment-$cid", 'alias' => variable_get('support_use_aliased_urls', TRUE)))
The use of url() here supposes that the 'alias' parameter means "I want this URL aliased (true/false)." It doesn't. 'alias' is whether [or not] the given path is a URL alias already. See the API for url().
The five uses of url() in support_mail_tokens() can all be fixed similarly:
'!ticket_url' => url("node/$nid", array('absolute' => TRUE, 'language' => $language, 'fragment' => "comment-$cid", 'alias' => !variable_get('support_use_aliased_urls', TRUE)))
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | support.module-adding-better-classes-fix-url-aliases.patch | 15.72 KB | Homotechsual |
| #6 | support.module-fix-url-aliases.patch | 3.47 KB | Homotechsual |
| #4 | support-url_aliases-1313856-4.patch | 3.75 KB | tinker |
| #1 | 1313856-aliased-urls.patch | 4.19 KB | wodenx |
Comments
Comment #1
wodenx commentedWas just about to submit this on a separate issue. Here's a patch.
Comment #2
wodenx commentedComment #3
wodenx commentedComment #4
tinker commentedConfirm issue and patch solution. I do not think you need the support_update_6012() that turns off url aliases. The patch fixes operation to how it should be so reversing the user selected setting does not make sense. I have re-rolled the patch removing the update.
Comment #5
jeremy commentedThanks -- I had to manually apply. Committed:
http://drupalcode.org/project/support.git/commit/101dad9
Needs to be ported to 7.x.
Comment #6
Homotechsual commentedPatch Description
Patch fixes use of URL aliases in notification emails.
Patch Dependencies
Patch depends on Support-7.x-1.x-dev/Support-7.x-1.0-rc2
Comment #7
Homotechsual commentedPatch Description
Patch fixes use of URL aliases in notification emails and includes classes fix from #2008354: Provide better classes and id's for theming comment form.
Patch Dependencies
Patch depends on Support-7.x-1.x-dev/Support-7.x-1.0-rc2
Patch includes patch from #2008354: Provide better classes and id's for theming comment form
Comment #8
Homotechsual commentedAny chance of this making it into the 7.x version?
Comment #9
wodenx commentedA bit late, but for the record - the update hook was to prevent any change in behavior on existing sites. For example, if I had a site that was relying on the existing (backwards) behavior (say I'd figured out that it wasn't working and changed the setting), then applying this patch (or update) could break my site. Changing the existing setting in the update hook guaranteed that my site would continue to act as it did before, only now the setting of the variable would correclty reflect the behavior.
Comment #10
mrtoner commentedSmart man.
Comment #13
purencool commented