BUG: HY000, 1366, Incorrect integer value: '' for column 'id' at row 1

TGeier 03 Feb, 2023
Hello community,
I found a bug.

Joomla 4.2.7, PHP 8.0 / 8.1 / 8.2
JoomForms in current version.

I create a form "New - Demo - Basic-Articel-List" and save it.

I call up the form and am directed to this page, for example:
https://www.domain.com/form-contact/

I want to add an article via the form, now I am redirected to the following page in the same tab
https://www.domain.com/component/chronoforms7/?chronoform=demo-form-contact&gpage=save&id=

Error:
HY000, 1366, Incorrect integer value: '' for column 'id' at row 1

Joomla4 LOG:
error - Uncaught Throwable of type Joomla\Database\Exception\ExecutionFailureException thrown with message "HY000, 1366, Incorrect integer value: '' for column 'id' at row 1". Stack trace:
#0 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/joomla/database_adapter.php(141): Joomla\Database\Pdo\PdoDriver->execute()
#1 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/model.php(1262): G3\L\Joomla\DatabaseAdapter->execute_query()
#2 [ROOT]/administrator/components/com_chronoforms7/chronoforms/libs/models.php(209): G3\L\Model->insert()
#3 [ROOT]/administrator/components/com_chronoforms7/chronoforms/functions/save_data/save_data_output.php(8): G3\A\E\Chronoforms\L\Models->save()
#4 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/traits/load_file.php(21): include('...')
#5 [ROOT]/administrator/components/com_chronoforms7/chronoforms/libs/page.php(44): G3\L\Component->load_file()
#6 [ROOT]/administrator/components/com_chronoforms7/chronoforms/libs/page.php(365): G3\A\E\Chronoforms\L\Page->fn()
#7 [ROOT]/administrator/components/com_chronoforms7/chronoforms/controllers/manager.php(104): G3\A\E\Chronoforms\L\Page->event()
#8 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/app.php(304): G3\A\E\Chronoforms\C\Manager->index()
#9 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/app.php(243): G3\L\App->processAction()
#10 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/app.php(78): G3\L\App->dispatch()
#11 [ROOT]/plugins/system/chronog3_plg/chronog3/libs/app_loader.php(67): G3\L\App::call()
#12 [ROOT]/components/com_chronoforms7/chronoforms7.php(41): G3\L\AppLoader->__construct()
#13 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#14 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#15 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#16 [ROOT]/libraries/src/Application/SiteApplication.php(200): Joomla\CMS\Component\ComponentHelper::renderComponent()
#17 [ROOT]/libraries/src/Application/SiteApplication.php(241): Joomla\CMS\Application\SiteApplication->dispatch()
#18 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\SiteApplication->doExecute()
#19 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute() #20 [ROOT]/index.php(32): require_once('...')
#21 {main}
TGeier 11 Apr, 2023
No solution available?
Max_admin 12 Apr, 2023
Do you have v7.0.10 installed ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
TGeier 15 Apr, 2023
Hey. yes, its the v7.0.10.

I use the Cassiopeia-Template.

Chronoforms v7.0.10 works fine on J3 with my own forms. As in the demo, I access a database and can edit it. Unfortunately, deleting does not work with my Joomspirit template - display error.

However, the form in J4 does not work properly. call, works. But when you click on an entry, the wrong one is called up, rarely the right one.

If I call up an entry with ID 3, the correct values are initially retrieved. I go back to the overview. If you call up the entry with ID 5, ID 5 is passed on via the URL, but the data of ID3 is still displayed.

When saving - "Error HY000, 1364, Field 'URL2' doesn't have a default value "
TGeier 06 May, 2023
Hey,

ok. The Problem "URL2" doesn't... is solved... -> Database column delete -> solved.


I can edit a article, no problem! But if i create a new -> HY000, 1366, Incorrect integer value: '' for column 'id' at row 1
TGeier 11 May, 2023
I suspect that "insert" doesn't work properly on Joomla 4. Since the id is empty, it complains that this value is invalid.
is there a solution in this case?
Max_admin 11 May, 2023
The auto increment field "id" should not be in the data set to be "saved", so if you are using the "save data" action then make sure the "id" is not passed in the data, if its passed then make sure it has a valid integer value, and that will be an "update"

so maybe try to remove the "id=" from the url ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
TGeier 11 May, 2023
Many thanks for the answer.

The form works in Joomla 3. The ID is there, but it is empty. that's how I understand the message.

Form update works.
When I open the page to edit or create a new one and remove "id=" at the end, I also get this error message.
TGeier 12 May, 2023
Hello, I finally found a solution. Is this normal?

When you click the "New" button, the "url=" parameter is appended to the URL. However, since this is empty, there is an error message.

HY000, 1366, Incorrect integer value: '' for column 'id' at row 1


Now I added the value 0 to the hidden ID under "Value" on the "edit" page.

Inserting new entries and updating existing entries now works.

This was not necessary with Joomla 3.
Max_admin 12 May, 2023
Both the Joomla 3 and J4 websites use the same mysql version ? this issue is related to mysql I think
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
TGeier 12 May, 2023
Yes, Same MSQL, Webserver, PHP,... Version.
Max_admin 18 May, 2023
Answer
1 Likes
The demo form is made long time ago before J4, so it may have issues, the solution is to set the default value of the hidden id field to "0"
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger