Problems with import forms from CF5 into CF7

Resolve import error when migrating forms from ChronoForms 5 to ChronoForms 7.

Overview

The error occurs because the import process attempts to insert an empty string into a database column that requires an integer value.
Edit the specified connections file and change the 'id' parameter value from an empty string to zero to allow successful form import.

Sc Schmoe 28 Mar, 2023
When we import a form from Chornoforms5, after clicking on the button 'Create Form' the message appears:

Es ist ein Fehler aufgetreten!
22007 22007, 1366, Incorrect integer value: '' for column `chronog3_forms7`.`id` at row 1


We have tested it with various forms that need to be imported, but this message always appears.

Creating completely new forms works.

What could be the reason for the errormessage?
Max_admin Max_admin 31 Mar, 2023
Answer
I have a fix for this issue, open this file:

JOOMLA\administrator\components\com_chronoforms7\chronoforms\controllers\connections.php



and find this line:
$connection['Connection'] = \G3\A\E\Chronoforms\L\Converter::cf5(['Connection' => $form['Form']], ['id' => '']);


then change it to this:
$connection['Connection'] = \G3\A\E\Chronoforms\L\Converter::cf5(['Connection' => $form['Form']], ['id' => 0]);


Does it solve the issue for you ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.