[ic] New Items errors...

Mike Heins mikeh@minivend.com
Mon, 20 Nov 2000 11:21:46 -0500


Quoting Mike Heins (mikeh@minivend.com):
> Quoting Paul Stearns (pauls@compuace.com):
> > I am having 2 problems, potentially related.
> > 
> > Problem 1.
> > 
> > When I am in the admin interface, the merchandising section, when I click on the
> > last column Promotion) and the row contains "none" I get an Internal Server error,
> > and the error log contains;
> > 
> > =============
> > 205.152.31.241 c7VwiW26:205.152.31.241 - [20/November/2000:00:28:54 -0500] flcit
> > rus /cgi-bin/flcitrus/admin/item_feature Safe: There is no row with index '55W'
> > at /usr/lib/interchange/lib/Vend/Table/Common.pm line 255.
> > >
> > >
> > >       my $db = $Db{merchandising};
> > >       my $date = $Tag->convert_date({ raw => 1 });
> > >       my $code = $CGI->{item_id} or return;
> > >       return unless $db->field($code, 'timed_promotion');
> > >       return if $date le $db->field($code, 'finish_date');
> > >       $db->set_field($code, 'featured', 'expired');
> > >       return;
> > >
> > >
> > 205.152.31.241 c7VwiW26:205.152.31.241 - [20/November/2000:00:28:54 -0500] flcit
> > rus /cgi-bin/flcitrus/admin/item_feature Runtime error: Can't call method "open_
> > table" on an undefined value at /usr/lib/interchange/lib/Vend/Data.pm line 789.
> > 
> 
> I can duplicate this on DBM databases, which I assume you are using (this info
> is nice to have when posting, by the way). It will be looked at.

This patch on lib/UI/pages/admin/item_feature.html:

29d28
<       return unless $db->record_exists($code);

will fix it. Fixed in CVS.

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer