ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Confusion and problems with comment_url variable in the Email Notification Templates

April 06, 2012 10:14am

Subscribe [1]
  • #1 / Apr 06, 2012 10:14am

    Emily Heath

    197 posts

    Hello,

    v2.3.0 - Build: date 20111011 (I know I need to update but I’m waiting for the latest 2.4 to come out before doing so).

    1. I’m using comment_url in my Email Notification Templates and it is showing up in some of the emails that get sent out as a absolute URL, and in others as only a relative URL. I only have a relative path inserted into the “Comment Page URL” field in the channel preferences, so I’m confused as to how it knows to insert the site_url too.
    In “Admin Notification of Comments” and “User Comment Notification” it is the absolute URL
    In “User Comments Added Notification” is is only relative URL.

    2. I’m using unconventional URLs for my blog content, because I’ve inserted the year and month into them. e.g http://www.mysite.com/content/2012/03/twist-i-named-him

    I’ve done this by inserting this

    /content/{entry_date format="%Y/%m"}/

    into the “Comment Page URL” field of the channel preferences.

    This {comment_url} variable gets parsed in some of the Email notification templates, but not others. The “Admin Notification of Comments” and “User Comment Notification” emails work for me, but the “User Comments Added Notification” doesn’t work the same way.

    E.g.

    The “Admin Notification of Comments” email that gets sent reads (as I intended):

    The title of the entry being discussed is:
    “Twist, I named him”
    http://www.mysite.com/content/2012/03/twist-i-named-him

    But the “User Comments Added Notification” email comes out as (line break included):

    You can see the comments at the following URL:
    http://www.mysite.com/content/{entry_date
    format="%Y/%m"}/twist-i-named-him/

    Do you know why my custom page URL gets parsed by the one email template but not by the other?

  • #2 / Apr 09, 2012 10:54am

    Dan Decker

    7338 posts

    Hi Emily,

    I’m not sure why the 2 templates are processed differently, but the parser used for these templates is different than the one for standard templates.

    Looking over the available variables, have you tried {comment_url_title_auto_path} in the user email template?

    The other aspect is the “intended audience”. The variable is processed for the admin, but not parsed for the user.

    As to your first question, the relative or absolute URL will work because ExpressionEngine will supply the site_url if needed.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases