[Vtigercrm-commits] [Vtiger development] #8280: Webforms fields are not saved.

Vtiger development vtiger-tickets at trac.vtiger.com
Thu Oct 2 01:54:48 GMT 2014


#8280: Webforms fields are not saved.
-----------------------+------------------------
 Reporter:  jgarces    |       Owner:  developer
     Type:  defect     |      Status:  new
 Priority:  major      |   Milestone:  6.2.0
Component:  vtigercrm  |     Version:  6.1.0
 Severity:  High       |  Resolution:
 Keywords:  Webforms   |
-----------------------+------------------------

Comment (by colter):

 In order to get my table to be created i had to remove the comma after
 line 15 (ON DELETE CASCADE). After removing that comma I was able to run
 the script but that still does not fix the webform action. I ran this
 below and the table was made but I still get a permission denied when
 trying to make a form
 [[Image(http://content.screencast.com/users/SEMScreen/folders/Snagit(2)/media/79c1e4a9-42d4-40f0
 -bf2e-8d1544db3482/10.01.2014-20.53.png)]]


 {{{
 CREATE TABLE vtiger_webforms_field (
 id INT(19) NOT NULL AUTO_INCREMENT,
 webformid INT(19) NOT NULL,
 fieldname VARCHAR(50) NOT NULL,
 neutralizedfield VARCHAR(50) NOT NULL,
 defaultvalue VARCHAR(200) DEFAULT NULL,
 required INT(10) NOT NULL DEFAULT '0',
 sequence INT(10) DEFAULT NULL,
 hidden INT(10) DEFAULT NULL,
 PRIMARY KEY (id),
 KEY webforms_webforms_field_idx (id),
 KEY fk_1_vtiger_webforms_field (webformid),
 KEY fk_2_vtiger_webforms_field (fieldname),
 CONSTRAINT fk_1_vtiger_webforms_field FOREIGN KEY (webformid) REFERENCES
 vtiger_webforms (id)
 ON DELETE CASCADE
 ) ENGINE=MYISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
 COLLATE=utf8_unicode_ci;
 }}}


 Replying to [ticket:8280 jgarces]:
 > In a clean instalation of vtiger 6.1.0, the webform module doesn't work
 correctly. This problem occurs also in previous version of vtiger (6.0.0).
 >
 > The symptoms are that if you want to save a webform with differents
 fields, the webform is saved but the fields not.
 >
 > The problem is due to vtiger_webforms_field table which is not created.
 If you search in the code (modules/Webforms/schema.xml) you can see the
 next sql sentence:
 >
 > CREATE TABLE `vtiger_webforms_field` (
 >   `id` int(19) NOT NULL AUTO_INCREMENT,
 >   `webformid` int(19) NOT NULL,
 >   `fieldname` varchar(50) NOT NULL,
 >   `neutralizedfield` varchar(50) NOT NULL,
 >   `defaultvalue` varchar(200) DEFAULT NULL,
 >   `required` int(10) NOT NULL DEFAULT '0',
 >   `sequence` int(10) DEFAULT NULL,
 >   `hidden` int(10) DEFAULT NULL,
 >   PRIMARY KEY (`id`),
 >   KEY `webforms_webforms_field_idx` (`id`),
 >   KEY `fk_1_vtiger_webforms_field` (`webformid`),
 >   KEY `fk_2_vtiger_webforms_field` (`fieldname`),
 >   CONSTRAINT `fk_1_vtiger_webforms_field` FOREIGN KEY (`webformid`)
 REFERENCES `vtiger_webforms` (`id`) ON DELETE CASCADE,
 >   CONSTRAINT `fk_3_vtiger_webforms_field` FOREIGN KEY (`fieldname`)
 REFERENCES `vtiger_field` (`fieldname`) ON DELETE CASCADE
 > ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 >
 > That sql sentence has a mistake in the Constraint elements. The second
 constraint (fk_3_vtiger_webforms_field) launch a violation error in mysql
 due to the primary key of the vtiger_field table. The "fieldname" field is
 not the primary key.
 >
 > Then, if you want to this sql sentence works fine, you might create the
 table in this way:
 >
 > CREATE TABLE `vtiger_webforms_field` (
 >   `id` int(19) NOT NULL AUTO_INCREMENT,
 >   `webformid` int(19) NOT NULL,
 >   `fieldname` varchar(50) NOT NULL,
 >   `neutralizedfield` varchar(50) NOT NULL,
 >   `defaultvalue` varchar(200) DEFAULT NULL,
 >   `required` int(10) NOT NULL DEFAULT '0',
 >   `sequence` int(10) DEFAULT NULL,
 >   `hidden` int(10) DEFAULT NULL,
 >   PRIMARY KEY (`id`),
 >   KEY `webforms_webforms_field_idx` (`id`),
 >   KEY `fk_1_vtiger_webforms_field` (`webformid`),
 >   KEY `fk_2_vtiger_webforms_field` (`fieldname`),
 >   CONSTRAINT `fk_1_vtiger_webforms_field` FOREIGN KEY (`webformid`)
 REFERENCES `vtiger_webforms` (`id`) ON DELETE CASCADE,
 > ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 >
 > With the creation of this table, the webform module works fine.
 >
 > Please, fix this issue in the following versions of vtiger.
 >
 > Thanks in advanced.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8280#comment:1>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list