Last updated Oct 27th, 2020 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$292 per month—let's make that $500!Learn more
What is SyntaxChecker?¶
SyntaxChecker is a plugin that checks the syntax of your MODX tags and alerts you to problems. This helps ensure that your documents and templates render the way you expect them to.
- MODX Revolution 2.1 or later
- PHP5 or later
SyntaxChecker was first released on December 20, 2011.
It can be downloaded from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, here: https://modx.com/extras/package/syntaxchecker
Once you've activated the plugin, no other action is required. Just observe that if your pages or templates have glitches in their tags, you'll see an error window pop up when you try to save.
The following represents some of the conditions that are checked for (see the readme.txt file for a full list):
- Basic integrity check: equal number of '
[[' and ']]'
- No looping conditions (e.g. where you put
[[*content]]inside your content).
- Snippets exist? e.g.
- Chunks exist? e.g.
- Resources exist? e.g.
- Settings exist? e.g.
- Document variables exist? e.g.
- Property sets exist? e.g.
- Output filters exist? e.g.
- Parameters are prefixed with an ampersand? e.g.
- Parameters delineated from the token via a question mark, e.g.
- Parameter names and values are separated by an equals sign, e.g.
- When saving a template, ensure that the TVs are assigned to the current template.
- Be sure to clear your MODX error log periodically.
- File bugs at https://github.com/fireproofsocks/SyntaxChecker