Anton Qcl Posted February 26, 2014 Report Posted February 26, 2014 Blesta version: 3.1.1 Url: https://my.blesta.site/admin/clients/edit/765/ Browser: Mozilla Firefox. Steps: Go to a client in the admin interface. Click "Edit". (Click "Add additional number"). Type number Click "Modify Client". Error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null on line 124 in /var/www/vhosts/my.blesta.site/public_html/lib/model.php Printing Stack Trace: #0 /var/www/vhosts/my.blesta.site/public_html/lib/model.php(124): PDOStatement->execute(Array) #1 /var/www/vhosts/my.blesta.site/public_html/components/record/record.php(216): Model->query('INSERT INTO `co...', Array) #2 /var/www/vhosts/my.blesta.site/public_html/app/models/contacts.php(475): Record->insert('contact_numbers', Array, Array) #3 /var/www/vhosts/my.blesta.site/public_html/app/models/contacts.php(188): Contacts->addNumber('503', Array) #4 /var/www/vhosts/my.blesta.site/public_html/app/controllers/admin_clients.php(991): Contacts->edit('503', Array) #5 /var/www/vhosts/my.blesta.site/public_html/lib/dispatcher.php(111): AdminClients->edit() #6 /var/www/vhosts/my.blesta.site/public_html/index.php(21): Dispatcher::dispatch('/admin/clients/...') #7 {main}
Cody Posted February 26, 2014 Report Posted February 26, 2014 I'm not able to duplicate this. 'type' comes from the type of phone number. This defaults to "phone". Clearly you have something going on where the type value isn't coming through.
Anton Qcl Posted February 26, 2014 Author Report Posted February 26, 2014 I'm not able to duplicate this. Did you try to use browser Mozilla Firefox? It is very important to duplicate this error. 'type' comes from the type of phone number. This defaults to "phone". Clearly you have something going on where the type value isn't coming through I mean browser "Mozilla Firefox" is sending wrong form to the handler.
Anton Qcl Posted February 26, 2014 Author Report Posted February 26, 2014 Tested in: OS: Microsoft Windows 8.1 Browser: Firefox 26.0 OS: Linux Browser: Firefox 24.0
Tyson Posted February 27, 2014 Report Posted February 27, 2014 I was able to replicate this issue in Firefox 27. It seems to be a rather strange issue either isolated to Firefox, or how Firefox interprets jquery/javascript cloned fields. I haven't looked into the cause yet, but I've added CORE-1079 so we can look into it further. Other browsers appear unaffected. If you want to add an additional phone number for a client where the Type is "Phone" or the Location is "Home", then you can work around this issue by changing the values twice. i.e. Change the Type from "Phone" to "Fax", then back to "Phone"; and change the Location from "Home" to "Work" and then back to "Home". Firefox will then submit the fields correctly and you won't experience the OP's error. Anton Qcl 1
Tyson Posted May 19, 2014 Report Posted May 19, 2014 This issue does not appear to affect Firefox 29, so I'm going to mark CORE-1079 as an issue we won't fix in Blesta. The solution would be to upgrade your FF browser. Michael and Blesta Addons 2
Recommended Posts