Re: [rt-users] PATCH: RT.pm.in for MasonComponentRoot

2009-07-23 Thread Jesse Vincent



On Thu, Jul 23, 2009 at 01:21:46PM -0700, Jo Rhett wrote:
 So I just setup 3.8.4 as an install from source in its own directory  
 instead of using the FreeBSD port.
 
 When I got done, I got a 404 error that wouldn't go away.  RT log  
 indicated
 [Thu Jul 23 19:57:45 2009] [warning]: [Mason] Cannot resolve file to  
 component: /u/rtweb/rt38/share/html/index.html (is file outside  
 component root?) at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/ 
 ApacheHandler.pm line 852. (/usr/local/lib/perl5/site_perl/5.8.8/HTML/ 
 Mason/ApacheHandler.pm:852)

Can you please send the ./configure invocation you used that generated
this error? I'm surprised I haven't run across this issue before.
 
 As it turns out, the problem was in lib/RT.pm.  It doesn't seem to  
 work okay with relative paths.
 
 --- RT.pm_orig  2009-07-23 13:12:45.0 -0700
 +++ RT.pm   2009-07-23 13:02:02.0 -0700
 @@ -75,7 +75,8 @@
 
   # $MasonComponentRoot is where your rt instance keeps its mason html  
 files
 
 -our $MasonComponentRoot = 'share/html';
 +our $MasonComponentRoot = '/u/rtweb/rt38/share/html';
 
   # $MasonLocalComponentRoot is where your rt instance keeps its site- 
 local
   # mason html files.
 
 The fix for the source tree would be:
 
 --- lib/RT.pm.in_orig   2009-07-23 13:18:30.0 -0700
 +++ lib/RT.pm.in2009-07-23 13:19:35.0 -0700
 @@ -75,7 +75,7 @@
 
   # $MasonComponentRoot is where your rt instance keeps its mason html  
 files
 
 -our $MasonComponentRoot = '@MASON_HTML_PATH@';
 +our $MasonComponentRoot = '@RT_PATH@/@MASON_HTML_PATH@';
 
   # $MasonLocalComponentRoot is where your rt instance keeps its site- 
 local
   # mason html files.
 
 -- 
 Jo Rhett
 Net Consonance : consonant endings by net philanthropy, open source  
 and other randomness
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
 

-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] PATCH: RT.pm.in for MasonComponentRoot

2009-07-23 Thread Jo Rhett
On Jul 23, 2009, at 1:55 PM, Jesse Vincent wrote:
 Can you please send the ./configure invocation you used that generated
 this error? I'm surprised I haven't run across this issue before.

Simple enough:

./configure --prefix=/u/rtweb/rt38 --with-web-handler=modperl2 --with- 
my-user-group --with-db-type=mysql

 On Thu, Jul 23, 2009 at 01:21:46PM -0700, Jo Rhett wrote:
 So I just setup 3.8.4 as an install from source in its own directory
 instead of using the FreeBSD port.

 When I got done, I got a 404 error that wouldn't go away.  RT log
 indicated
 [Thu Jul 23 19:57:45 2009] [warning]: [Mason] Cannot resolve file to
 component: /u/rtweb/rt38/share/html/index.html (is file outside
 component root?) at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/
 ApacheHandler.pm line 852. (/usr/local/lib/perl5/site_perl/5.8.8/ 
 HTML/
 Mason/ApacheHandler.pm:852)


 As it turns out, the problem was in lib/RT.pm.  It doesn't seem to
 work okay with relative paths.

 --- RT.pm_orig  2009-07-23 13:12:45.0 -0700
 +++ RT.pm   2009-07-23 13:02:02.0 -0700
 @@ -75,7 +75,8 @@

  # $MasonComponentRoot is where your rt instance keeps its mason html
 files

 -our $MasonComponentRoot = 'share/html';
 +our $MasonComponentRoot = '/u/rtweb/rt38/share/html';

  # $MasonLocalComponentRoot is where your rt instance keeps its site-
 local
  # mason html files.

 The fix for the source tree would be:

 --- lib/RT.pm.in_orig   2009-07-23 13:18:30.0 -0700
 +++ lib/RT.pm.in2009-07-23 13:19:35.0 -0700
 @@ -75,7 +75,7 @@

  # $MasonComponentRoot is where your rt instance keeps its mason html
 files

 -our $MasonComponentRoot = '@MASON_HTML_PATH@';
 +our $MasonComponentRoot = '@RT_PATH@/@MASON_HTML_PATH@';

  # $MasonLocalComponentRoot is where your rt instance keeps its site-
 local
  # mason html files.

 -- 
 Jo Rhett
 Net Consonance : consonant endings by net philanthropy, open source
 and other randomness
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


 Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
 Buy a copy at http://rtbook.bestpractical.com


 -- 

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source  
and other randomness

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com