It's pretty hard to find the actual reason of these kind of error . But one thing is sure that template is causing issue.
The most common reason for this error is missing of dependency . for e.g. missing feature.
Best solution is to run the STPInspector tool . It will help to diagnose whether all the dependency are present in server or missing something .
You can get tool from STPINSPECTOR