As designed  Template Error Overlay Only Showing 1 Error?

James

Well-known member
error.webp
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.
 
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.
 
Top Bottom