I'm having a problem with Contour using a MySQL database when trying to save particular field types. I can save the form using particular field types no problem, such as textfield, upload file, but I can't save the form when using a radio button list, or checkbox list. When using these datatypes I get a bubble stating 'Failed to save form'.
I'm running the following: IIS6 Windows Server 2003 Umbraco 4.6.1 .NET4 MySQL 5.5.9 Contour 1.1.6
I've also tested in Umbraco 4.7 on the same setup with the same error. However I tested the same setup but using Microsoft SQL Server 2008 instead of MySQL and had no problem saving with check box lists and radio button lists, so the issue appears to be with Contour and MySQL. I've reported it as a bug but would appreciate a quick solution as I'm meant to be delivering this site to live today!
There is an error in the install mysql install script, the updated column on the ufrecord table is missing a default. So you can update that manually or it is fixed in the 1.1.8 WIP release
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Without knowing how the code behind works, I changed the default value of the 'updated' column to '0000-00-00 00:00:00' so that default values were being applied. I still have no luck getting the Contour forms to save with CheckBox lists and RadioButton lists. In case the current date is necessary for saving, I also applied a before insert trigger to the column 'updated' so it had the current date. Still no effect.
I've realised that the workaround you suggested for the UFRecords table isn't related to the original problem I have, however it is still a problem that will need fixing.
I wasn't explicit enough in my first post. My original problem is that I can't save my Contour forms when creating them in the Umbraco CMS with checkbox lists and radiobutton lists. I can save the form when I add a checkbox list or radiobutton list BEFORE I add values to those lists, but as soon as I try and populate with prevalues it won't save the form.
I've had a look, and the prevalues table isn't being populated with values I create for them. It seems as though the query to populate the MySql table doesn't even reach MySql at all, so perhaps there is a code problem rather than database.
Please let me know if you can find and resolve this issue. My company have recently moved to MySql with their Umbraco sites and we have several sites soon to be deployed (two have already) and we rely a lot on Contour for our forms functionality.
Yes, that has been applied successfully and fixed the problem. The DB script now creates the table structure correctly too. :)
Slightly off-topic, but while you're in the Contour project, could you update the MySql drop script please? At the moment it is attempting to drop tables without dropping constraints first, so when trying to uninstall the package in the CMS it fails to do so correctly. The uninstall script states that it was successful, but if you look at the DB you will see many of the Contour tables remain, which prevents re-installation of Contour.
Failed to save form error using MySQL
Hi all
I'm having a problem with Contour using a MySQL database when trying to save particular field types. I can save the form using particular field types no problem, such as textfield, upload file, but I can't save the form when using a radio button list, or checkbox list. When using these datatypes I get a bubble stating 'Failed to save form'.
I'm running the following:
IIS6
Windows Server 2003
Umbraco 4.6.1 .NET4
MySQL 5.5.9
Contour 1.1.6
I've also tested in Umbraco 4.7 on the same setup with the same error. However I tested the same setup but using Microsoft SQL Server 2008 instead of MySQL and had no problem saving with check box lists and radio button lists, so the issue appears to be with Contour and MySQL. I've reported it as a bug but would appreciate a quick solution as I'm meant to be delivering this site to live today!
Thanks
Stuart
Comment author was deleted
Hi,
There is an error in the install mysql install script, the updated column on the ufrecord table is missing a default. So you can update that manually or it is fixed in the 1.1.8 WIP release
http://nightly.umbraco.org/Umbraco%20Contour/1.1.8%20WIP/
Regards,
Tim
Thanks Tim, I'll give that a try.
Stuart
Hi Tim
The create.sql install script for MySQL still has an invalid statement at 'created' and 'updated' columns.
You cannot have two default current_timestamp values in MySQL (http://dev.mysql.com/doc/refman/5.0/en/timestamp.html). Here is the error from MySQL when trying to create this table:
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Without knowing how the code behind works, I changed the default value of the 'updated' column to '0000-00-00 00:00:00' so that default values were being applied. I still have no luck getting the Contour forms to save with CheckBox lists and RadioButton lists. In case the current date is necessary for saving, I also applied a before insert trigger to the column 'updated' so it had the current date. Still no effect.
Could you please have a look at this?
Thanks
Comment author was deleted
Hi Stuart,
Yes I'll take a look at the mysql issue tomorrow and report back here with more details
Regards,
Tim
Hi Tim
I've realised that the workaround you suggested for the UFRecords table isn't related to the original problem I have, however it is still a problem that will need fixing.
I wasn't explicit enough in my first post. My original problem is that I can't save my Contour forms when creating them in the Umbraco CMS with checkbox lists and radiobutton lists. I can save the form when I add a checkbox list or radiobutton list BEFORE I add values to those lists, but as soon as I try and populate with prevalues it won't save the form.
I've had a look, and the prevalues table isn't being populated with values I create for them. It seems as though the query to populate the MySql table doesn't even reach MySql at all, so perhaps there is a code problem rather than database.
Please let me know if you can find and resolve this issue. My company have recently moved to MySql with their Umbraco sites and we have several sites soon to be deployed (two have already) and we rely a lot on Contour for our forms functionality.
Thanks
Stuart
Comment author was deleted
Checking the issues today so will hopefully have a solution for you by then end of today.
I'll report back here as soon as I have more info.
Comment author was deleted
Problem should be fixed, simply install or upgrade to the 1.1.8 WIP version:
http://nightly.umbraco.org/Umbraco%20Contour/1.1.8%20WIP/
Would be awesome if you could confirm that it works now
Regards,
Tim
Hi Tim
Yes, that has been applied successfully and fixed the problem. The DB script now creates the table structure correctly too. :)
Slightly off-topic, but while you're in the Contour project, could you update the MySql drop script please? At the moment it is attempting to drop tables without dropping constraints first, so when trying to uninstall the package in the CMS it fails to do so correctly. The uninstall script states that it was successful, but if you look at the DB you will see many of the Contour tables remain, which prevents re-installation of Contour.
Many thanks
Stuart
Comment author was deleted
Great glad the issue is fixed.
Ah thanks for the heads up, I'll look into the issue.
Cheers,
Tim
Comment author was deleted
Drop script should also be sorted, so will be part of the 1.1.8 release
If you notice any other issues with running on mysql please let me know
Thanks,
Tim
Thanks for that Tim, and don't worry I'm sure you'll be the first to know if there are more MySql issues! :)
Stuart
Comment author was deleted
Perfect ;)
is working on a reply...