Why existing templates can no longer pass compilation now?

Hello, which version of touying are you using? You might need to upgrade the version.

See How to use context instead of a callback function in locate function calls?