Re: variant table delete error

Jon Jensen <[email protected]> Thu, 31 May 2018 10:19:47 -0600 (MDT)
Newsgroups gmane.comp.web.interchange.users
Message-ID <nycvar.YSQ.7.76.1805311018230.3391@ybpnyubfg>
On Thu, 31 May 2018, kerry wrote:

> : Must input some sort of search -- at least 2 characters total
>
> When trying to delete defunct items from the variant table, I am getting
> the error above. This in the latest version of Strap installed by
> Endpoint on my server.
> Error log:
> query was:insert into inventory (`sku`,`quantity`) VALUES (?,?)
>> values were:'36807-835 Truffle',''
> 68.166.116.32 vMVmiQRG:68.166.116.32 - [31/May/2018:05:07:13 -0400]
> basicq /cgi-bin/basicq/admin/flex_editor set_slice error as called by
> Vend::Data: DBD::mysql::st execute failed: Incorrect integer value: ''
> for column 'quantity' at row 1 at
> /home/interch/live/interchange/lib/Vend/Table/DBI.pm line 1453.

You might try updating the database config for the inventory table to say 
NULL is preferred to an empty string, in 
dist/strap/dbconf/mysql/inventory.mysql:

Database  inventory  PREFER_NULL  quantity

Old versions of MySQL tolerated bogus data like an empty string '' for a 
numeric column, but newer versions no longer do, by default.

Jon


-- 
Jon Jensen
End Point Corporation
https://www.endpoint.com/