Jump to content

service fields key validation


Blesta Addons

Recommended Posts

the blesta has a limit for the service key field, it would better to made a check before sending the fields to the service controller to add add/edit service. i found this in my blesta logs

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'key' at row 1 in /home/***********/public_html/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/***********/public_html/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/***********/public_html/vendors/minphp/record/src/Record.php(275): Minphp\Db\PdoConnection->query('INSERT INTO `se...', Array) #2 /home/***********/public_html/app/models/services.php(3654): Minphp\Record\Record->insert('service_fields', Array, Array) #3 /home/***********/public_html/app/models/services.php(3604): Services->addField('16241', Array) #4 /home/***********/public_html/app/models/services.php(1266): Services->setFields('16241', Array) #5 /home/***********/public_html/app/controllers/admin_clients.php(6053): Services->add(Array, Array, true) #6 /home/***********/public_html/app/controllers/admin_clients.php(5941): AdminClients->createService(Array, Array) #7 /home/***********/public_html/app/controllers/admin_clients.php(4688): AdminClients->processServiceStep('confirm', Object(stdClass), Object(stdClass), Object(stdClass)) #8 /home/***********/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminClients->addService() #9 /home/***********/public_html/index.php(21): Dispatcher::dispatch('/admin/clients/...') #10 {main} 

i don't have info about this action, but maybe one of the staff are wanting to add service with long key in the service field .

Link to comment
Share on other sites

  • 5 months later...

the service field length 32 is a small value for a general and all purpose usage . i have already talked in this subject ina old thread that i have not success to get the post. in some module the service fields need more than 32 chars.

i will insist again to make it at least 64 chars, and don't know why it was limited to 32 chars only!!! how we can save service fields like this 'dotfrcontactentitybirthplacecountrycode' !!!!  we should contact the register to tell him sorry blesta is not supporting more than 32 chars so please change to a less chars !!! and of course if this is working with whmXX, their answer will be a pretty small as change the software to another is already working with our system!!!!

Link to comment
Share on other sites

We can consider updating character lengths for some database columns, but I'm not sure I understand the example of fields like "dotfrcontactentitybirthplacecountrycode", which can currently be saved in an abbreviated form and mapped by the module to whatever appropriate field name they require for any API requests.

Link to comment
Share on other sites

22 hours ago, Tyson said:

currently be saved in an abbreviated form and mapped by the module to whatever appropriate field name they require for any API requests.

Extra work for us, mapping and mapping for any service fields that is more than 32 chars. working with the real vars save us a lot of work (loops, searching index ... )

anyway, i'm not expecting anything, there are a very important things that was not implemented for years now, so this small things is not changing anything for us. it was for archiving/remeber purpose only.

Link to comment
Share on other sites

  • Tyson locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...