"Apply"ing a missing template gives no warning #21

Closed
clanehin opened this Issue May 12, 2012 · 4 comments

Projects

None yet

2 participants

@clanehin

My use case was something like:

<apply template="path/to/outer"><apply template="path/to/inner"/></apply>

Which causes heist to look for "inner" in /path/to/path/to/inner, because there is no leading /. I have no opinion on whether this behavior is correct or not, but it did surprise me as a newbie. It would help even out the learning curve if file-not-found conditions issued some kind of warning message (or maybe I just don't know how to turn warnings on).

@mightybyte
Snap Framework member

The reason I haven't done any checking here is because apply tags are not evaluated until template serve time, so you wouldn't see any error when you start your application anyway. I didn't output any errors because I figured it wouldn't do much good to clutter up the end user's rendered template.

We are working on some changes that may allow us to do what you want here, so I'll leave the issue open for now. But unless someone can suggest something I haven't thought of, I don't see a good solution for this with Heist as it works today.

@clanehin

Can we hook it to go to the web server's error log?

@mightybyte
Snap Framework member

Heist exists as a standalone template system, and doesn't have any dependency on Snap, so we can't hook into the web server's log.

@mightybyte
Snap Framework member

This is fixed in Heist 0.10 which is currently in the master branch on github. The splice gets run at load time, so we can now fail fast and loudly without negative impact to the website user.

@mightybyte mightybyte closed this Sep 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment