Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Error running installation code...

Quote Reply
Error running installation code...
Man...whats wrong with this code? At first I thought it was the value not being passed into $html, but the debugging 'print' statements seem to show other wise. Code is;

Code:
my @files = ('cat_advert.html',
'cat_advert_admin.html',
'cat_admin_front.html');

my $html;
foreach $html (@files) {

print "File: $html <BR>";

# if templates already exist...dont get rid of em!
if (-e "$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/$html") { next; }

$file = $tar->get_file ($html);
$file->name("$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/$html") or return Plugins::Category_Adverts->error("Error: $GT::Tar::error");
$file->write or return Plugins::Category_Adverts->error("Unable to extract file: '$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/$html' ($GT::Tar::error)", 'WARN');
}

The error when installing is;

Error running installation code: Can't call method "name" on an undefined value at (eval 4) line 194.

Am I going mad? What am I doing wrong? Unsure

*is glad he has short hair, so he can't pull it out easily*

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread; hot thread Error running installation code... Andy 5316 Feb 7, 2003, 2:40 AM
Post; hot thread Re: [Andy] Error running installation code...
Paul 5052 Feb 7, 2003, 2:46 AM
Thread; hot thread Re: [Andy] Error running installation code...
pugdog 5092 Feb 7, 2003, 2:47 AM
Thread; hot thread Re: [pugdog] Error running installation code...
Andy 5109 Feb 7, 2003, 2:48 AM
Thread; hot thread Re: [Andy] Error running installation code...
Paul 5057 Feb 7, 2003, 2:50 AM
Thread; hot thread Re: [Paul] Error running installation code...
Andy 5065 Feb 7, 2003, 2:52 AM
Thread; hot thread Re: [Andy] Error running installation code...
Paul 5071 Feb 7, 2003, 3:03 AM
Thread; hot thread Re: [Paul] Error running installation code...
Andy 5057 Feb 7, 2003, 3:19 AM
Thread; hot thread Re: [Andy] Error running installation code...
Paul 5109 Feb 7, 2003, 3:28 AM
Post; hot thread Re: [Paul] Error running installation code...
Andy 5054 Feb 7, 2003, 3:47 AM
Thread; hot thread Re: [Paul] Error running installation code...
webmaster33 5054 Feb 7, 2003, 4:46 AM
Thread; hot thread Re: [webmaster33] Error running installation code...
Paul 5084 Feb 7, 2003, 6:10 AM
Post; hot thread Re: [Paul] Error running installation code...
webmaster33 5028 Feb 7, 2003, 6:23 AM
Post; hot thread Re: [webmaster33] Error running installation code...
Andy 4990 Feb 8, 2003, 6:37 AM