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

As Designed Template Error Overlay Only Showing 1 Error?

Discussion in 'Resolved Bug Reports' started by James, Jan 26, 2011.

  1. James

    James Well-Known Member

    error.jpg
    As you can see, there are two errors in the code.
    Error 1: No closing comment element.
    Error 2: Invalid syntax for <xen:include>.

    The actual error overlay only shows the template syntax error rather than the missing closing element also.

    This may be as designed, but it'd be easier to put all the bugs into one overlay to prevent a fix -> save -> error -> fix -> save -> error cycle until all the errors are fixed.
     
  2. Mike

    Mike XenForo Developer Staff Member

    When you have a syntax error, it can't continue to parse the rest (this is actually a very specific type of parsing and much more challenging). In this particular example, technically speaking, there is only one error: that the comment tag isn't closed. The other error you're pointing to would be in a comment tag anyway... or if the comment tag is the error, should it be ignored? You can see the ambiguity.

    Actually, what it sees is the bad attribute, but there's no closing tag on the include or the comment, so there are a lot of potential errors it could report. Reporting the first syntax error is exactly how PHP works, for example.
     

Share This Page