[Catalyst] Adding DBIC schema causes TT error

Charlie Garrison garrison at zeta.org.au
Thu Jun 21 01:30:17 GMT 2007

Good morning,

On 20/6/07 at 4:32 PM +1000, Charlie Garrison 
<garrison at zeta.org.au> wrote:

>I've run into a problem that I can't make any progress with; 
>hoping someone might be able offer suggestions.
>Development was moving along nicely and then I suddenly got the following error in a response:
>Couldn't render template "file error - welcome.tt2: not found"

I broke out the debugger and I think I found the cause of the 
problem (at least *a* cause if not *the* cause). I have a custom 
view that I use for creating email messages. That view is 
getting found instead of the default View::TT.

That also explains why the TT:P debug output was not being 
printed; the TT view was not being used.

So, what are my best options for fixing this? (I'd also like to 
learn more and understand why adding another controller or 
module causes a different view to be used.)

I'm guessing the best solution is to specify which view 
RenderView should be using. I have done that by adding 
"default_view => 'TT'" to MyApp->config.

     name => 'MyApp',
     default_view => 'TT',

I also tested by setting current_view in the end/RenderView action.

$c->stash->{current_view} = 'TT';

Is one of those a 'preferred' method for setting the default view?

Is the problem I encountered symptomatic of a bug within 
Catalyst that needs to be fixed? As a 'quick' solution can I 
suggest the Catalyst debug output show which view is being used. 
Knowing that a different view was being used would have saved me 
many hours on this.

Anyway, back to work now. Even with this loss of time I'm still 
getting this project done much faster with Catalyst than using 
my old home-made framework. It's really good kit.


    Charlie Garrison  <garrison at zeta.org.au>
    PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

More information about the Catalyst mailing list