Getting "Can't locate object method "host" viapackage "URI::_generic" at/opt/rt3/bin/../lib/RT/Interface/Web.pm line 190"

Kevin,
You’re correct but I couldn’t figure out what the problem was so I had to remove the setting (after I figured out what was wrong) to fix it.
I was trying to correct a template setting that was emailing a link using “localhost” instead of the base url of the site so I added the following to correct it:
Set($WebBaseURL,‘ittickets.cnc.bc.ca’);
This setting is what caused the error in the subject of this message. Not withstanding the link in the emailed messages were actually correct with that setting. Yes everything worked, the email was sent the database was updated etc, only the redirection is what failed with the above error being returned to the browser.
Removing the WebBaseURL restored the redirection and the incorrect link in the email.
I have overcome that by manually entering the correct link in the template as opposed to using a variable in the template.

Kevin W. Gagel
Network Administrator
Local 5448
My blog:
http://mail.cnc.bc.ca/blogs/gagel
My shared files:
http://mail.cnc.bc.ca/users/gagel--- Original message —
Subject: Re: [rt-users] Getting "Can’t locate object method “host” viapackage “URI::_generic” at/opt/rt3/bin/…/lib/RT/Interface/Web.pm line 190"
From: Kevin Falcone falcone@bestpractical.com
To: RT Users RT-Users@lists.bestpractical.com
Date: 25/06/2009 10:35 AM

On Jun 24, 2009, at 5:58 PM, Kevin Gagel wrote:

Please help! I’ve broken something and I’m not sure what.

I’m pretty sure it has something to do with my RT_SiteConfig.pm
file, I had made some changes so that links in the tickets were
showing up correctly. They were only showing up ashttp://localhost:80/
etc. Now they are showing up correctly.

Anyway’s the error only shows up when creating a new ticket. The
ticket is created and everything seems to work correctly but the
only thing updated in the browser is:
Can’t locate object method “host” via package “URI::_generic” at /
opt/rt3/bin/…/lib/RT/Interface/Web.pm line 190

I have to go back to a previous change and then click home to
continue.

Most likely, you have an invalid WebURL

You might want to examine all of the Web* variables you’ve set in your SiteConfig

The error comes from RT trying to redirect to your WebURL but being unable to parse it

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

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

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

Kevin,
You’re correct but I couldn’t figure out what the problem was so I
had to remove the setting (after I figured out what was wrong) to
fix it.
I was trying to correct a template setting that was emailing a link
using “localhost” instead of the base url of the site so I added the
following to correct it:
Set($WebBaseURL,‘ittickets.cnc.bc.ca’);

From the documentation in RT_Config.pm

C<$WebBaseURL> is the scheme, server and port (eg ‘http://
rt.example.com’)
for constructing urls to the web UI. C<$WebBaseURL> doesn’t need a
trailing /.

It sounds like you actually wanted to set $WebDomain

-kevin