Steps to reproduce:
1. Navigate to Content, click on Web Content.
2. Create a new structure that has a document and media field.
3. Add a template for created structure via manage templates, then click on save.
"$processor.processMax() " is displayed, and errors occurred in console.
Please refer to the attachment.
The template works as expected.