Forums

v4 to v5

diabolka 07 Mar, 2016
We have v4 (which is no longer working properly suddenly - all required fields are being ignored as required and submitting blank) so we installed a v5 version.

The v5 installation was successful. I ran the v4 restore option which I know is not stable but it restored the forms but none of the events. Is there a way to do that easily or is it something I have to recreate for each form?
diabolka 07 Mar, 2016
As an additional note, the fields came through perfectly, just the On Load and on Submit events didn't transfer.
GreyHead 08 Mar, 2016
Hi diabolka,

There is no automatic upgrade from CFv4 to CFv5 - as you saw, the 'Experimental' restore just loads the Form HTML and that is not in CFv5 layout style.

Both will run on Joomla! 3 and my recommendation is that you build new forms in CFv5 and transfer others over when they need to be updated.

The validation problem is probably from a JavaScript error on the page.

Bob
CraigH 28 Mar, 2016
I have just carried out a V4 to V5 migration. I have to say it all went very smoothly.

As reported here using the v4 to v5 backup/restore method most of the form copied across and those fields that did not were easily recreated in V5. IIRC the fields that did not copy were dropdowns and date picker.
Also as reported here the actions were all missing, but again it was fairly easy to work through the actions from the V4 form copying the actions and action contents.
I got stuck with the tcpdf action and then saw the forum post http://www.chronoengine.com/forums/posts/t101601.html which showed how to resolve the issue introduced in Chronoforms_V5.0.11_Component.

All-in-all a painless migration, would recommend upgrading to V5 with the improved interface.

One thing I seem to have lost in the migration is population of the cf_created, cf_created_by, cf_user_id, etc... fields which are a useful audit. I have not looked into whether these columns have changed name or removed yet or maybe I have missed a step in the migration.
GreyHead 28 Mar, 2016
Hi CraigH,

Max changed some of the column names in CFv5 and removed a few others.

[list]cf_created is now created
cf_created_by has gone
cf_user_id is now user_id[/list]

You can rename columns, or start new tables, or add custom code to generate the old values - depending on your specific needs.

Bob
CraigH 29 Mar, 2016
Hi Bob

Many thanks for the update. I just tried renaming some of the columns on the table as you described above. After doing that I cannot view the table from the CF5 backend (ie by selecting the relevant table under "Connected tables" in the forms manager). I get a 1054 (MySQL unknown column) error something like :

"Unknown column 'ListData.cf_created' in 'field list' SQL=SELECT `ListData`.`cf_id` AS `ListData.cf_id`, `ListData



I have tried "changing some" & "changing all" the cf_xxx columns including the PK "cf_id" to "id" column but get the same issue. I presume CF5 is somewhere storing or working out what these additional columns are meant to be but I cannot find it.

I am also finding that new form submissions are not filling out the renamed columns.

I want to do the migration properly so would prefer to sort this out rather than adding custom code to allow use of the old names.

I created a new form with a DBSave to a new table built from scratch to compare new verses migrated config but I cannot work out how to get this working.

Maybe I am better recreating the table from the forms manager under a new name and then copying the existing data across from the old table.

Craig
CraigH 29 Mar, 2016
I took a different approach, I copied the table:
[list]CREATE TABLE tableNEW LIKE tableOLD;
INSERT INTO tableNEW SELECT * FROM tableOLD;[/list]

and then removed or renamed the columns in the new table as listed below
[list]cf_id = id
cf_uid = uniq_id
cf_created = created
cf_modified = modified
cf_created_by DROP
cf_modified_by DROP
cf_ipaddress DROP
[/list]
And then changed the form DBSave action to write to the new table.

That works fine. I never worked out why renaming the existing table columns did not work for me.
GreyHead 30 Mar, 2016
Hi Craig,

The problem with changing the column names was most likely that CF had cached the names. If you change anything about an existing table, then click the Delete Cache icon in the Forms Manager toolbar to clear the cache. Sorry I didn't think of this yesterday :-(

Bob
CraigH 30 Mar, 2016
Ah of course, yes I didn't spot that icon, I was looking all over the database looking for where it might be caching the column names, even base64 decoding the large blob of data associated with the form. I just tested that icon on my test site and that worked a treat. Ah well I will leave the live site with the newly copied table as that is working fine. Many thanks for your assistance.
This topic is locked and no more replies can be posted.