1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug Two variables in phrases that perhaps ought to be the same?

Discussion in 'Resolved Bug Reports' started by SchmitzIT, May 31, 2013.

  1. SchmitzIT

    SchmitzIT Well-Known Member

    I stumbled upon this by accident today, but there are two different variables used in phrases that apparently translate to the same.


    I searched and replaced all instances of {board_title}, and was surprised to find not everything changed. Some further investigation yielded that {board} was also used.

    Might be intentional, but it struck me as odd, so I figured I'd file it here :)
  2. Mike

    Mike XenForo Developer Staff Member

    Phrase replacements aren't global. They refer to particular variables being passed in on a case by case basis.

    While yes, these ideally should be consistent, it basically ends up being an unnecessary BC break. The variable names are really there to help identify the content that will be inserted. (Replacing the variables with a constant variable is not an expected/supported option.)
  3. SchmitzIT

    SchmitzIT Well-Known Member

    Thanks, Mike. I'm not replacing them, though. Just adding text before them.

    Out of curiosity, what's a BC break?
  4. Mike

    Mike XenForo Developer Staff Member

    Backwards compatibility break. As in, anyone who customized those phrases would suddenly get {placeholders} showing up instead of the content.
    shenmuee likes this.
  5. SchmitzIT

    SchmitzIT Well-Known Member

    Ah ok. Gotcha.

    Found another oddity with the variables, though.

    The email reset mail should be defined in the following phrase:


    Here's my replacement near the end:


    The {board_title}

    (Just added "the").

    However, the mail I receive is slightly different:

    {board_title} without "the". Also not how thanks in the phrase is followed by a comma, but the mail shows a . (period).

    I searched, and found "thanks." as a separate phrase, and the "you may safely ignore it" as well. I just don't get where this is defined, exactly? How come there are apparently more locations for this to be created?

  6. xf_phantom

    xf_phantom Well-Known Member

    Welcome to the strange XenForo (Email) Template world:)

    that's the html version, which isn't a phrase you're able to edit.
    You need to enable the debug mode and then you can edit it in your acp / development tab
  7. SchmitzIT

    SchmitzIT Well-Known Member

    Hmph. I do recall seeing email templates, but could have sworn it was a different system, lol.

    Is that not something you could consider patching somehow, Mike? Having to switch on debug mode is a pain. The phrases ought to tackle the contents of the mails, as far as I can see.

Share This Page