[Interchange-bugs] [Bug 223] New - Crash in wizard at preview page
bugzilla-daemon@interchange.redhat.com
bugzilla-daemon@interchange.redhat.com
Sat Jun 16 14:40:00 2001
http://developer.akopia.com/bugs/show_bug.cgi?id=223
*** shadow/223 Sat Jun 16 14:39:52 2001
--- shadow/223.tmp.31249 Sat Jun 16 14:39:52 2001
***************
*** 0 ****
--- 1,301 ----
+ Bug#: 223
+ Product: Interchange
+ Version: 4.7.x
+ Platform: PC
+ OS/Version: Windows 2000
+ Status: NEW
+ Resolution:
+ Severity: normal
+ Priority: P2
+ Component: UI
+ AssignedTo: __UNKNOWN__
+ ReportedBy: craig@cellarcinemas.com
+ URL:
+ Cc:
+ Summary: Crash in wizard at preview page
+
+ 1. checkout cvs head (in this case 4.7.5)
+ 2. ./configure
+ 3. makecat (with computers as the foundation store type)
+ 4. start interchange and go to the wizard
+ 5. [entered my store info - let me know if you need more info]
+ 6. At Preview page, click Finish and the following error is in
+ the error.log
+
+ gateway 39QQB66o:gateway - [16/June/2001:14:39:56 -0400] store /cgi-
+ bin/store/ui Safe: require trapped by operation mask
+ at /usr/local/lib/perl5/5.6.1/File/Copy.pm line 10.
+ > Compilation failed in require at (eval 61) line 31.
+ >
+ >
+ > my $vdb = $Db{variable};
+ > my $adb = $Db{access};
+ > my $udb = $Db{userdb};
+ >
+ > my %doit = (
+ > abouttext => sub {
+ > my $content = $Values->
+ {abouttext};
+ > $content =~ s/\r\n/\n/g;
+ > $content =~ s/\r//g;
+ > $Tag->substitute_file(
+ > {
+ > content
+ => 1,
+ > file
+ => 'pages/aboutus.html',
+ > body =>
+ $content,
+ > }
+ > );
+ > },
+ > abouttitle => sub {
+ > $Tag->substitute_file(
+ > {
+ > scratch
+ => 'page_title',
+ > file
+ => 'pages/aboutus.html',
+ > body =>
+ $Values->{abouttitle},
+ > }
+ > );
+ > },
+ > adminpass => sub {
+ > $adb->set_field(
+ > $Values->
+ {adminuser},
+ > 'password',
+ > $Tag->crypt
+ ($Values->{adminpass}),
+ > );
+ > $adb->set_field(
+ > $Values->
+ {adminuser},
+ > 'name',
+ > 'Admin user',
+ > );
+ > $adb->set_field(
+ > $Values->
+ {adminuser},
+ > 'super',
+ > 1,
+ > );
+ > },
+ > adminuser => undef,
+ > address => 'ADDRESS',
+ > city => 'TOWN',
+ > company => 'COMPANY',
+ > country => 'COUNTRY',
+ > domainname => 'DOMAINNAME',
+ > emailinfo => 'EMAIL_INFO',
+ > emailservice => 'EMAIL_SERVICE',
+ > fax => 'FAX',
+ > fedadder => sub {
+ > return unless $Values->
+ {shipmethod} =~ /\bfed/i;
+ > $Tag->substitute_file(
+ > {
+ > begin
+ => q{FEDE:.*adder\s*=>\s*["']?},
+ > global
+ => 1,
+ > end =>
+ q!["']?\s*[,}]!,
+ > greedy
+ => 0,
+ > file
+ => 'products/shipping.asc',
+ > body =>
+ $Values->{fedadder},
+ > }
+ > );
+ > },
+ > fedmodes => 'FEDEX_MODES',
+ > indextext => sub {
+ > my $content = $Values->
+ {indextext};
+ > $content =~ s/\r\n/\n/g;
+ > $content =~ s/\r//g;
+ > $Tag->substitute_file(
+ > {
+ > content
+ => 1,
+ > file
+ => 'pages/index.html',
+ > body =>
+ $content,
+ > }
+ > );
+ > },
+ > indextitle => sub {
+ > $Tag->substitute_file(
+ > {
+ > scratch
+ => 'page_title',
+ > file
+ => 'pages/index.html',
+ > body =>
+ $Values->{indextitle},
+ > }
+ > );
+ > },
+ > enablesecure => 'SECURE_ENABLE',
+ > defaultshipi => 'SHIP_DEFAULT_INTL',
+ > defaultshipd => 'SHIP_DEFAULT_DOM',
+ > flati => 'SHIP_FLAT_INTL_RATE',
+ > flatd => 'SHIP_FLAT_DOM_RATE',
+ > paymentreferer => 'MV_PAYMENT_REFERER',
+ > paymentsecret => 'MV_PAYMENT_SECRET',
+ > paymentid => 'MV_PAYMENT_ID',
+ > paymentserver => 'MV_PAYMENT_SERVER',
+ > authnetmode => 'AUTHNET_MODE',
+ > signiomode => 'SIGNIO_MODE',
+ > cyberkey => 'CYBER_KEY',
+ > cyberid => 'CYBER_ID',
+ > cyberfile => 'CYBER_CONFIGFILE',
+ > cybermode => 'CYBER_MODE',
+ > mailorderto => 'ORDERS_TO',
+ > paycheck => 'CHECK_ACCEPTED',
+ > paycod => 'COD_ACCEPTED',
+ > paygate => 'PAYGATE',
+ > paymo => 'POSTAL_ACCEPTED',
+ > paypo => 'PO_ACCEPTED',
+ > payment_mode => 'MV_PAYMENT_MODE',
+ > pgp => 'PGP',
+ > pgpkeyid => 'PGP_KEY',
+ > phone => 'PHONE',
+ > products => sub {
+ > },
+ > shipzip => 'UPS_ORIGIN',
+ > shoppass => sub {
+ > $udb->set_field(
+ > $Values->
+ {adminuser},
+ > 'password',
+ > $Values->
+ {adminpass},
+ > );
+ > $udb->set_field(
+ > $Values->
+ {adminuser},
+ > 'fname',
+ > $Values->
+ {firstname},
+ > );
+ > $udb->set_field(
+ > $Values->
+ {shopuser},
+ > 'password',
+ > $Values->
+ {shoppass},
+ > );
+ > $udb->set_field(
+ > $Values->
+ {shopuser},
+ > 'fname',
+ > $Values->
+ {firstname},
+ > );
+ > },
+ > shopuser => undef,
+ > style => 'STYLE',
+ > creditcards => 'CREDIT_CARDS_ACCEPTED',
+ > state => 'STATE',
+ > taxlocation => 'TAXAREA',
+ > taxrate => 'TAXRATE',
+ > taxship => 'TAXSHIPPING',
+ > tollfree => 'TOLLFREE',
+ > upsadder => sub {
+ > my $mode = $Values->
+ {shipmethod};
+ > $mode =~ s/\W/ /g;
+ > return unless $Values->
+ {shipmethod} =~ /ups/i;
+ > my $status = $Tag-
+ >substitute_file(
+ > {
+ > begin
+ => q{UPSE:.*adder\s*=>\s*["']?},
+ > global
+ => 1,
+ > end =>
+ q!["']?\s*[,}]!,
+ > greedy
+ => 0,
+ > file
+ => 'products/shipping.asc',
+ > body =>
+ $Values->{upsadder},
+ > }
+ > );
+ > return $status;
+ > },
+ > upsmodes => 'UPS_MODES',
+ > zip => 'ZIP',
+ >
+ > );
+ >
+ > for (keys %doit) {
+ > my $val;
+ > next unless $val = $doit{$_};
+ > if( ref($val) =~ /CODE/) {
+ > my $status = $val->();
+ > push @messages, "$_ subroutine returned $status.";
+ > }
+ > elsif($val =~ /\w+/) {
+ > $vdb->set_field($val, 'Variable', $Values->{$_});
+ > push @messages, "$_ set $val to '$Values->{$_}' in
+ variable.";
+ > }
+ > else {
+ > @errors, "Don't know what to do with $_=$val";
+ > }
+ > }
+ >
+ > if($Db{country}) {
+ > my @all = grep /^\w+$/, split /[\s,\0]+/, $Values->{upsmodes};
+ > push @all, grep /^\w+$/, split /[\s,\0]+/, $Values->{fedmodes};
+ > unshift @all, grep /^\w+$/, split /[\s,\0]+/, $Values->
+ {defaultshipi};
+ > unshift @all, grep /^\w+$/, split /[\s,\0]+/, $Values->
+ {defaultshipd};
+ > my %seen;
+ > @all = grep ! $seen{$_}++, @all;
+ > my %intl = qw/
+ > FLATI 1 PERI 1 FREE 1
+ > FIP 1 FIE 1
+ > XPR 1 XDM 1 XPRL 1 XDML 1 XPD 1
+ > /;
+ > my @na_modes = grep ! $intl{$_}, @all;
+ > my @intl_modes = grep $intl{$_}, @all;
+ > my $na_string = join " ", splice @na_modes;
+ > my $intl_string = join " ", splice @intl_modes;
+ > my $db = $Db{country};
+ > my ($k, @f);
+ > my $rc = $db->query(qq{
+ > update country set shipmodes
+ = '$intl_string' where code != 'US'
+ > });
+ > push @messages, "set shipmodes to '$intl_string' in $rc countries";
+ > $rc = $db->query(qq{
+ > update country set shipmodes
+ = '$na_string'
+ > where code = 'US'
+ > });
+ > push @messages, "set shipmodes to '$na_string' in US";
+ > $rc = $db->query(qq{
+ > update country set shipmodes
+ = '$na_string'
+ > where code = 'CA'
+ > });
+ > push @messages, "set shipmodes to '$na_string' in Canada";
+ > }
+ >
+ > $out = "Messages: <BR>";
+ > $out .= join "<BR>", @messages;
+ > return $out unless @errors;
+ > $out .= "<P>Errors: <BR>";
+ > $out .= join "<BR>", @errors;
+ >
+ >