If there is an invalid rule (for example: a circular reference where the expression contains the field itself – like A = A+1), the template saves successfully.
The first sync afterwards may return an internal 500 error, but if the sync is hit again, it completes successfully.
The problem is that the template is available and appears to be fine. However, no rules will work. This is because the sync fails and no rule scripts are loaded for the template.
We are working to add better rule editing and error reporting, but in the meantime, if you have a template where the rules are not working, please review and verify the rules that you have set up on the template through Designer.