A-book v4beta SQL error 1366 incorrect integer value ''

Started by richardh9935, 11 January 2022, 23:40:38

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

richardh9935

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:

  • IMPORT form does not return the integer value of the USERID, but instead returns NULL.
  • IMPORT form puts NULL in the file instead of the existing value
  • BOOK table definition for USERID does not allow NULL values.

The StackOverFlow recommendation is to change the BOOK table definition to allow NULL values for INTEGER columns.

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

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
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]