Here are some tips for testing and troubleshooting VenueOps document templates.
Recommended Tools
- Google Chrome browser set up with two users (or you can use Edge Chromium as your second browser)
- SublimeText as a text editor
When building templates, it is recommended to have two different browser windows open so you can edit the template on one browser while being simultaneously logged into the client account and test against actual data. This article walks through how to configure and use multiple Google Chrome user accounts. Alternately, you can use Microsoft Edge Chromium in addition to Google Chromes your second browser.
Sublime Text or NotePad++ are both great text editors that come in handy for cleaning formatted text (by copying and pasting into notepad, then copying from there) or for FInding and Replacing text which can sometimes be handy for editing templates with lots of text.
Building/Testing Workflow Tips
- Build the template in one browser.
- Save frequently and use the Preview button to make sure nothing is breaking.
- Because the test data is not realistic, it is best to log into an account on your second browser and open an example event to test with.
- Make changes in the Template editor and save, then switch to the other window to test.
Troubleshooting Guide
The error messages in templates can sometimes be cryptic. The table below shows some common issues:
| Error Message | Common Cause | Steps to Troubleshoot |
| Error: Reached unparseable token in expression: |
Missing curly brace
ex: {{Name} Styling applied between handlebars ex: {{Name}} |
Do a CTRL+F to search for "{" or "}"
This will highlight all areas where curly braces, and thus handlebars objects, exist Then make sure that every handlebars object is surrounded by {{ and }} This sometimes happen when styling is applied splitting the handlebars in the source code. For example, if the last 2 braces aren't bolded in {{Event.Name}}, a , a </span> element is now within the handlebars syntax causing this error. If you can use the HTML as a context clue to find the closes handlebars element, try retyping that without using copy / paste. |
| Error: Starting and ending handlebars do not match |
Extra curly brace
ex: {{Name}}} |
Do a CTRL+F to search for "{{{" or "}}}"
This will highlight any areas where there is an extra brace |
| Error: [something] is undefined |
Incorrect handlebars field or context
Incorrect {{#with}} or {{#each}} Incorrect level / context |
Do a CTRL+F and search for the object that is said to be undefined
Make sure that the object is in the correct context / level Search before and after to make sure the correct {{#with}} {{/with}} is around the object; Ex: {{Name}} could be missing the {{#with Event}} or prefix {{Event.Name}} Make sure that if you are referencing an array of objects (Functions, Items, etc) that you are using either a {{#tablerow}} or {{#each}} to repeat over multiple objects. |
Comments
0 comments
Article is closed for comments.