Template error messages
When a template has a problem, you’ll see a message explaining what’s wrong. Here are the most common ones.
Curly braces
Section titled “Curly braces”| Message | Cause | Fix |
|---|---|---|
Missing closing curly braces near ... | An opening {{ has no matching }}. | Add the closing }}. |
A single opening curly brace cannot designate a data marker ... | Only one { where two are needed. | Use {{ and }} in pairs. |
A single closing curly brace is not allowed ... | A stray }. | Use }} to close. |
Unknown markers and helpers
Section titled “Unknown markers and helpers”| Message | Cause | Fix |
|---|---|---|
<name> is not defined | The data marker isn’t recognised. | Check the spelling and pick it from the marker list. |
The helper '<name>' does not exist | A helper name is misspelled. | Check the helper name (e.g. #if, #foreach). |
<name> is not a data marker or variable name | The name breaks the naming rules. | Use lowercase letters, numbers, dots, and underscores. |
Blocks not closed
Section titled “Blocks not closed”| Message | Cause | Fix |
|---|---|---|
No {{#endif}} close tag found | An #if has no #endif. | Add {{#endif}}. |
No {{#endforeach}} close tag found | A #foreach has no #endforeach. | Add {{#endforeach}}. |
| Message | Cause | Fix |
|---|---|---|
'#foreach' statement is not defined correctly. | The #foreach line is malformed. | Check the marker and any sorting instruction. |
'<name>' is not a list. | You’re looping over something that isn’t a list. | Use a list marker (e.g. matter.timerecords). |
Calculations
Section titled “Calculations”| Message | Cause | Fix |
|---|---|---|
Calculation cannot be empty | #calc has nothing to calculate. | Add an expression, e.g. {{#calc property.price / 10}}. |
variable declaration must contain an '=' sign | #var is missing =. | Use {{#var $x = ...}}. |
'<name>' is not a valid name for a variable | The variable name is invalid. | Start with $ and follow the naming rules. |
Decimal places must be a whole number of 0 or more | #ceil / #floor was given a fractional or invalid decimal-places argument. | Use a whole number, e.g. {{#ceil $x = property.price / 100 2}}, or omit it for 0. |
Conditions
Section titled “Conditions”| Message | Cause | Fix |
|---|---|---|
Expected an operator but got '<x>' | Two values with no operator between them. | Add an operator like =, >, or and. |
Expected an operand but got '<x>' | An operator with nothing to act on. | Check the expression is complete. |
'<x>' is not a valid parameter | A value in the condition isn’t valid. | Use a marker, number, or quoted text. |