Database error 1366

Once the “Place Campaign in Queue for Sending” button is clicked I get the error:
“Database error 1366 while doing query Incorrect integer value: ‘’ for column xxxxx_yyyyy-phplist.phplist_message.template at row 1”
as a consequence the campaign is stopped.
my server runs with PHP Version 7.4.29 and MySQL Version 10.3.35-MariaDB.
Does somebody had or has the same problem?

@Oreste I guess it is to do with the sql_mode. What is the value of the template column in the message table for that campaign?

Thanks for your reply, I paste it below:

GLOBAL.sql_mode =
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

SESSION.sql_mode =
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

sql_mode =
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

@Oreste
What is the value of the template column in the message table for that campaign?

Is this the complete error message? Is there anything more in the mysql server log?

Database error 1366 while doing query Incorrect integer value: '' for column xxxxx_yyyyy-phplist.phplist_message.template at row 1

Yes it is the complete message.
I am afraid I am unable too access the log, I am working on a remote server via cpanel, I cannot ssh the server.
The campaign is still a draft, it is not possible to activate it because of the database error.
The “message” table contains just one row at the moment, the “template” column displays a NULL value.

@Oreste You can try changing that value from null to 0.

Also look in the messagedata table for a row with the id of the campaign and name column of ‘template’. That too should be set to 0 if it is present. A template value of 0 means that no template is being used.

I’m not sure how the field has a value of null. Do you remember how you created the campaign?

In “messagedata” table is present a row name = “id”, id=1, data=1.

I changed the value of “template” column, “message” table, from NULL to 0 (zero), the error does not appear any more, just the messages: “Campaign added” and “Campaign queued”. I suppose that the problem is slved in this way.

I created the campaign with a web page as content, html format.

I am now testing the campaign.

Thanks for your support.