[ic] Can't delete items category (Interchange 4.9.8)

Art art at alpentech.net
Mon Oct 13 04:52:57 EDT 2003


Setup fresh install since upgrade from 4.8.x to 4.9.8 never worked out.
Used the foundation "tools" sample data.
Using text files for db not MySQL or other DB server.
Redhat 7.3 with kernel 2.4.18-24.7.x
Apache 1.3.27 with suexec
Perl 5.6.1.
Safe::Hole v0.08, Bundle::LWP v1.09, LWP::Simple c1.35, etc. all show loaded 
from the server info page.
Can't find any listing on cpan or Internet for Vend::Table:Shadow (which error 
lists), except for a vague mention on this mailing list that it's being 
worked on by someone in the future (old archives).

When I try to delete an item category using the metadata tables editor page 
(which fails) the interchange error log reports the following:

[ip obfuscated] gIj349vL:[ip obfuscated] - [13/October/2003:02:18:38 -0700] 
alpentech2 /cgi-bin/[catalogname]/admin/flex_select.html Safe: Can't locate 
object method "delete_record" via package "Vend::Table::Shadow" (perhaps you 
forgot to load "Vend::Table::Shadow"?) at 
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Safe/Hole.pm line 78.
>
>
>               my $idp;
>               return unless delete $CGI->{deleterecords};
>               for(qw/ui_delete_id item_id/) {
>                       next if ! $CGI->{$_};
>                       $idp = $_;
>                       last;
>               }
>
> #Log("using idp=$idp, value=$CGI->{$idp}");
>               return unless $idp;
>
>               delete $Scratch->{ui_location};
>               $Config->{NoSearch} = '';
>
>               my @deltables = split /[\s0,]/, $CGI->{ui_delete_tables};
>               unshift @deltables, $CGI->{mv_data_table};
>               my @out;
>               for(@{$CGI_array->{$idp}}) {
>                       my $key = $_;
>                       my $db;
>                       for(@deltables) {
>                               my ($t, $col) = split /:/, $_;
>                               next unless $t;
>                               if ( $Tag->if_mm('!tables', "$t=d") ) {
>                                       push @errors,
>                                               errmsg("Not authorized to 
delete from table %s", $t);
>                                       next;
>                               }
>                               unless ($db = $Db{$t}) {
>                                       push @errors, errmsg("Table %s not 
available.", $t);
>                                       next;
>                               }
>                               if($col) {
>                                       next unless length ($key);
>                                       $key = $db->quote($key, $col);
>                                       my $num = $db->query("delete from $t 
where $col = $key");
>                                       if($num > 0) {
>                                               push @out, errmsg(
>                                                                       
"deleted %s records from %s where %s = %s",
>                                                                       $num,
>                                                                       $t,
>                                                                       $col,
>                                                                       $key,
>                                                                       );
>                                       }
>                                       else {
>                                               push @errors, errmsg(
>                                                                              
"No records in %s where %s = %s",
>                                                                              
$t,
>                                                                              
$col,
>                                                                              
$key,
>                                                                              
);
>                                       }
>                               }
>                               else {
>                                       next unless $db->record_exists($key);
>                                       $db->delete_record($key)
>                                               or do {
>                                                       push @errors, $@;
>                                                       next;
>                                               };
>                                       push @out, errmsg("Deleted %s from 
%s", $key, $t);
>                               }
>                       }
>               }
>               if(@errors) {
>                       my $str = '<ul><li>';
>                       $str .= join '<li>', @errors;
>                       $str .= '</ul>';
>                       $Tag->error({ name => 'db_maintenance', set => $str 
});
>               }
>               if(@out) {
>                       my $str = '<ul><li>';
>                       $str .= join '<li>', @out;
>                       $str .= '</ul>';
>                       $Tag->warnings($str);
>               }
>               return;
>
>


Any suggestions as to where to begin to look?
Thanks,
-Art



More information about the interchange-users mailing list