[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.
Jon Jensen
jon at endpoint.com
Tue Apr 3 21:08:10 UTC 2018
On Sun, 1 Apr 2018, Gert van der Spoel wrote:
> Also the admin has been causing me issues where it did not want to make
> updates using the Item Editor ...
>
> The issue turned out to be in this code in lib/Vend/Data.pm:
> https://github.com/interchange/interchange/blob/master/lib/Vend/Data.pm
> (starting at line 2290):
> my $k = $multikey ? undef : $key;
> my $args = [$dml, $k];
> for (keys %$qd) {
> $qret = $qd->{$_}->set_slice($args, $qf->{$_}, $qv->{$_});
> $rows_set[$i] ||= $qret;
> }
>
> It has to do a couple of 'set_slice' calls in the for loop ... But after
> the first set_slice the $args value changed to an empty array.
>
> I then changed my code to:
> my $k = $multikey ? undef : $key;
> my $args = [];
> for (keys %$qd) {
> $args = [$dml, $k];
> $qret = $qd->{$_}->set_slice($args, $qf->{$_}, $qv->{$_});
> $rows_set[$i] ||= $qret;
> }
>
> And this solved my problem and data was updated correctly for all
> queries in the for loop ... Maybe this will help someone in the future
> when trying to install latest Interchange on a very new Perl and Debian
> install ...
Gert, nice sleuthing!
You found a bug I unknowingly introduced just a few weeks ago. I'm sorry
about that!
I'm not sure why it affected you and not me, since I still wasn't able to
reproduce it, but your change undoes part of what I did here:
https://github.com/interchange/interchange/commit/fa63936889ba6877869ce9f19c8ac313a8ca375c#diff-af495b310ee2b8d00d86ed9deb1d4b11
Maybe it's something different about the databases we're using.
Anyway, I fixed it here, putting that part back the way it was:
https://github.com/interchange/interchange/commit/a603f8914031e8611d5cb4b2b3029d6dbc84d463
Can you please try that version of Vend::Data just to make sure it works
for you too?
Thanks,
Jon
--
Jon Jensen
End Point Corporation
https://www.endpoint.com/
More information about the interchange-users
mailing list