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

Fixed phrase does not get translated correctly

Discussion in 'Resolved Bug Reports' started by Garani, Jan 19, 2011.

  1. Garani

    Garani Active Member

    Hi all!

    I am starting to play with the templates and add-ons and I have found a possible bug.

    I am working on the thread_create template to add a DIV that draws a box so that I can upload some more info for that thread. The code I have put in place is (I have cut out the rest of the code):

    HTML:
            <div id="photo-upload-box">
                    <h1>{xen:phrase iio_optional_fields}</h1>
    <SNIP>
            </div>
    
    I have a phrase in Master Language with title: iio_optional_fields and content "Optional Fields"

    When the page is rendered the HTML that I get is the following:

    HTML:
            <div id="photo-upload-box">
                    <h1>Create Thread</h1>
    <SNIP>
            </div>
    
    The rest of the phrases are displayed correctly, but not this one. I wonder if I stumbled on a bug or I am missing something along the line...
     

    Attached Files:

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Does the phrase exist in the language you are using?
     
  3. Garani

    Garani Active Member

    Brogan, that isn't the problem, but I can now confirm that there is a bug, or at least an "undocumented" feature.

    BEHAVIOUR
    If the code tread_create.html code is like this:
    HTML:
    <h1>What ever you write, a static or a xen statement</h1>
    
    The code that gets displayed in the browser is:
    HTML:
    <h1>Create Thread</h1>
    
    REASON
    This happens when ever you use the h1 tag, in any position within the tread_create template. I have turned off Javascript and it turns out that things are correctly displayed.

    SOLUTION
    So the point is that within the thread_create template you can't use the H1 html tag, since Javascript is atually manipulating that.
     
  4. Mike

    Mike XenForo Developer Staff Member

    It happens because of the live title code, which I've changed to only fall back to the first H1 on the page.
     
  5. Garani

    Garani Active Member

    Yap, did notice that ;)
     

Share This Page