Jump to content

Error Of Adding Number To Client Via Mozilla


Anton Qcl

Recommended Posts

Blesta version: 3.1.1

Url: https://my.blesta.site/admin/clients/edit/765/

Browser: Mozilla Firefox.

 

Steps:

 

  1. Go to a client in the admin interface.
  2. Click "Edit".
  3. (Click "Add additional number").
  4. Type number
  5. 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}
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...