[Catalyst] Template rendering error under mod_perl
Richard Jones
ra.jones at dpw.clara.co.uk
Fri Jun 29 16:33:46 GMT 2007
Bill Moseley wrote:
> On Fri, Jun 29, 2007 at 02:20:23PM +0100, Richard Jones wrote:
>
>> I didn't actually 'install' it as such, just copied the MyApp directory
>> under my /home folder, added the path/to/MyApp/lib to mod_perl's lib in
>> startup.pl file so it can find MyApp.pm, and re-started the server. It
>> looks like Catalyst _can_ find the 'home' directory, as it displays
>> correctly in the rather verbose 'Config' section of the screen dump:
>> home => '/home/raj/www/apps/MyApp',
>> and directly under that is root/lib and root/src. I REALLY need to fix
>> this one or I'm sunk!
>>
>
> What debugging did you do? Did you dump the INCLUDE_PATH?
>
In MyApp::View::TT:
MyApp::Debug::DEBUG( __PACKAGE__->config->{INCLUDE_PATH} ):
$VAR1 = [
bless( {
'file_spec_class' => undef,
'volume' => '',
'dirs' => [
'',
'home',
'raj',
'www',
'apps',
'MyApp',
'root',
'lib'
]
}, 'Path::Class::Dir' ),
bless( {
'file_spec_class' => undef,
'volume' => '',
'dirs' => [
'',
'home',
'raj',
'www',
'apps',
'MyApp',
'root',
'templates'
]
}, 'Path::Class::Dir' )
];
This is correct - I moved the templates dir underneath MyApp/root.
> Template::Provider also has some dubbing available. Did you enable
> that? Have you tried making a local copy of Template::Provider in
> your lib directory and throw in some warn statements?
>
>
No, I wasn't aware of it's existence! Even after reading the docs it's
not clear (to me) how to use the $provider object within Catalyst to get
the template path, or why this is any better than using the INCLUDE_PATH
from MyApp::View::TT
This is getting weirder - if I try to load a page normally available
only after login, I get another path error in addition to the template
error:
Form (search): Can't find form config search.fb in:
/home/raj/www/apps/MyApp/root/forms, yet search.fb is most definitely
present in /home/raj/www/apps/MyApp/root/forms. All root sub-dir files
set to 0644 permissions, with user/group set to same as other web files.
What gives?
--
Richard Jones
More information about the Catalyst
mailing list