Gossamer Forum
Home : Products : Gossamer Links : Discussions :

question about GT Template

Quote Reply
question about GT Template
Hello

I've made a template called Index.html
and I get the following error when I try to access it

(Can't use an undefined value as a SCALAR reference at /opt/guide/www.ridesworld.com/cgi-bin/ridesworld/admin/GT/Template.pm line 662.

I ust acces it in ssh, because the browser wouldn't give me an error page.


I think it comes form a global called newuser, code:

sub {
my $user_db = $DB->table(´Users´);
$user_db->select_options ("ORDER BY Add_Date DESC", "LIMIT 10");
my $sth1 = $user_db->select ( { Status => ´Registered´ } );
my $user_output;
while (my $users = $sth1->fetchrow_hashref) {
if (length $users->{Username} > 50) {
$users->{shortname} = substr($users->{Username}, 0, 50) . ´...´;
}
else {
$users->{shortname} = $users->{Username}
}
$user_output .= qq~<LI><A HREF="$CFG->{build_user_url}/$users->{Username}" onMouseOver="window.status=´$users->{Username}.´; return true;" onMouseOut="window.status=´´;">$users->{shortname}</A>~;
}
return $user_output;
}

my questions are:

what is wrong with thje global above.
what to do with suchs error messages if GT::Template cannot parse my template.
Can you supply me some information about that?

Thanks,

Eric.
Quote Reply
Re: [ridesworld] question about GT Template In reply to
$users->{shortname} = $users->{Username};
Quote Reply
Re: [afinlr] question about GT Template In reply to
hello

Thank you afinlt, but I have one question.
Do you, or anybody else know why I did not get a normal error message loaded from Links.pm but an empty browser screen (same screen if you don't have internet acces).
I have to receive the error message by running the script from shell?

Eric,