[ic] There was an error adding the order to the transaction table. It was: Not a GLOB reference at /opt/interchange-master/lib/Vend/Table/Common.pm line 1080.

Stefan Hornburg (Racke) racke at linuxia.de
Fri Mar 30 07:15:49 UTC 2018


On 03/26/2018 11:36 PM, Gert van der Spoel wrote:
> Hi,
> 
>  
> 
> I’m trying to run an Interchange site using interchange-master and I’m running into issues trying to make an order.
> 
> The site is using a pretty standard etc/log_transaction file.
> 
> Finalizing the order results in the following error:
> 
> “There was an error adding the order to the transaction table. It was: Not a GLOB reference at
> /opt/interchange-master/lib/Vend/Table/Common.pm line 1080.”
> 
>  
> 
> This happens for transaction and orderline tables.
> 
>  
> 
> Now if I change the lib/VendTable/Common.pm with the following diff then it does pass:
> 
> 1080c1080
> 
> <                                             open(IN, "+<", \$infile)
> 
> ---
> 
>>                                             open(IN, '+<', $infile)
> 
>  
> 
> For reference: https://github.com/interchange/interchange/blob/master/lib/Vend/Table/Common.pm
> 
>  
> 
> I don’t know if this has anything to do with the newer Perl version or that there is some other glitch somewhere. As
> I’ve kinda been out of Perl for the past 10 years, I hope someone here with more recent Perl experience could shine a
> light on this.
> 
>  
> 
> Now after making this change it does pass, but then I end up with the next error:
> 
> “import into orderline failed: DBD::mysql::st execute failed: Column \'store_id\' cannot be null at
> /opt/interchange-master/lib/Vend/Table/DBI.pm line 1593, <IN> chunk 2.”
> 

Hello Gert,

looks like you don't set a value for store_id in your [import] block. [import] behaves pretty stupid as it
tries to set fields even if you don't pass them inside.

Regards
          Racke

>  
> 
> This seems to be because the following set_row code is not passing on the correct data:
> 
>      NOTES => <<EndOfRoutine,
> 
>         while (<IN>) {
> 
>             chomp;
> 
>                 \@fields = ();
> 
>                 s/\\r?\\n\\r?\\n((?s:.)*)//
> 
>                      and \$fields[$idx] = \$1;
> 
>                 while(s!($codere):[ \\t]*(.*)\\n?!!) {
> 
>                      next unless defined \$field_hash->{\$1};
> 
>                      \$fields[\$field_hash->{\$1}] = \$2;
> 
>                 }
> 
>                 $index
> 
>                 $numeric_guess
> 
>             \$out->set_row(\@fields);
> 
>                 $numeric_clean
> 
>         }
> 
>  
> 
> Does anybody have any good ideas/pointers why this might be happening?
> 
>  
> 
> CU,
> 
>  
> 
> Gert
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.



More information about the interchange-users mailing list