Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: richardh9935 on 11 January 2022, 23:40:38

Title: A-book v4beta SQL error 1366 incorrect integer value ''
Post by: richardh9935 on 11 January 2022, 23:40:38
I am importing the file I exported from J3 to get the Books data from J3 to J4. (All other tables worked fine.) I confirmed that the file contains the correct integer value (without quotes) for USERID, but I keep getting the SQL error 1366. I am using the beta version 4 of A-book.

This issue may not affect users who stayed with v4.* of Mysql or MariaDB. I've moved up a version at the same time.

I found a request for help on StackOverFlow that looks as though it matches our situation.
https://stackoverflow.com/questions/41473485/cant-get-rid-of-error-number-1366-incorrect-integer-value
New versions of MariaDB and Mysql are less tolerant of the NULL value.

This suggests that either:

The StackOverFlow recommendation is to change the BOOK table definition to allow NULL values for INTEGER columns.
Title: Re: A-book v4beta SQL error 1366 incorrect integer value ''
Post by: federica on 12 January 2022, 14:58:18
Hi richardh9935,
the import-export tool is intendend for operation in the same version of Abook. The export-import fron abook J3 to abook j4 is not supported because some fields may be different.
If you want to upgrade a joomla web site to J4 follow these steps:
- upgrade jommla from j3 to j4
- install abook 4 without unistall abook 3

In this way the installation process is able to modify INTEGER field values from NULL to zero. The affected fields are "year", "user_id", "userid", "user_id", "pag_index". See administrator/components/com_abook/sql/updates/mysql/4.0.0.sql and 3.1.6.sql for get the queries if you needs
Title: Re: A-book v4beta SQL error 1366 incorrect integer value ''
Post by: richardh9935 on 13 January 2022, 04:10:22
Thank you.