[ZendTo] 'Your Organization' field too long for database

Jules Jules at Zend.To
Wed Sep 30 16:51:55 BST 2020


Liam,

I have just released a new beta for you, 6.06-1.
Sorry it's taken quite so long. Something called "term time" seems to be 
very nearly upon us! Teaching starts Monday, in all its Covid-19-secure 
features. There are a few daft 1-way systems on campus right now!

It should auto-update your DB schema to make all the fields that contain 
organization names (there are 3 I think) 255 characters long instead of 
32. I've also added your suggestion of a "maxlength" attribute, and I've 
changed the code so that even if somehow you exceed that, the code won't 
break (but it might well truncate the org name to 255 characters instead).

Please can you give it a try and let me know how you get on?

I'll be particularly interested to know if the auto-schema-update works 
correctly or not.

Cheers,
Jules.

On 17/09/2020 10:45, Gretton, Liam via ZendTo wrote:
>
> As a quick fix on our site, I've edited templates/verify.tpl and added 
> maxlength="32" to the senderOrganization input field definition.
>
> *Liam Gretton
> Systems Specialist***
>
> **
>
> IT Services,
> University of Leicester, University Road, Leicester, LE1 7RH, UK
>
> *t:*+44 (0)116 252 2254
> *e:*liam.gretton at leicester.ac.uk <mailto:liam.gretton at leicester.ac.uk>
> *w:*www.le.ac.uk <http://www.le.ac.uk/>_
> _
> Follow us on Twitter <https://twitter.com/uniofleicester> or visit our 
> Facebook <http://www.facebook.com/uniofleicester> page
>
> *From:*jules at zend.to <jules at zend.to>
> *Sent:* 17 September 2020 09:56
> *To:* ZendTo Users <zendto at zend.to>
> *Cc:* Gretton, Liam <liam.gretton at leicester.ac.uk>
> *Subject:* Re: [ZendTo] 'Your Organization' field too long for database
>
> Liam,
>
> Thank you for spotting that!
>
> I will work out a fix (and an automatic way of quietly fixing the DB 
> schema to extend this field) and put it in the next release.
>
> BTW I assume you're using a MySQL DB back-end, yes?
>
> Cheers,
> Jules.
>
> On 17/09/2020 08:26, Gretton, Liam via ZendTo wrote:
>
>     Hi,
>
>     When someone requests to drop-off a file, one of the fields to
>     complete is 'Your organization'. If the user enters more than 32
>     characters here (which is not disallowed), then the form fails.
>     The zendto log reports:
>
>     Error: Failed to add 2a753247dd272bb39c4547da5b44550f to authtable
>     for user at example.com <mailto:user at example.com>. Error was Data too
>     long for column 'Organization' at row 1
>
>     The column in the DB is only 32 characters, but the code is not
>     truncating the data from the form before trying to push it in.
>
>     I'm currently running 6.03-5, though a check of the release notes
>     of the newer versions doesn't mention a fix for this yet.
>
>     This has hit us with some collaborators whose organisations really
>     do have long names such as ' Swiss Tropical and Public Health
>     Institute' so my preference would be for the db field to be
>     longer, and to have the code truncate anything that doesn't fit.
>     If I can find time today I'll have a look through the code and try
>     to submit a patch.
>
>     Thanks,
>
>     Liam
>
>     *Liam Gretton
>     Systems Specialist*
>
>     **
>
>     IT Services,
>     University of Leicester, University Road, Leicester, LE1 7RH, UK
>
>     *t:* +44 (0)116 252 2254
>     *e:* liam.gretton at leicester.ac.uk
>     <mailto:liam.gretton at leicester.ac.uk>
>     *w:* www.le.ac.uk
>     <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2F&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421298364&sdata=5QjX3n9TqQH7xAXDxC1%2BDpyZe8sKvSfpWpsofls%2B5q8%3D&reserved=0>_
>     _
>     Follow us on Twitter
>     <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Funiofleicester&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421298364&sdata=nhERR6NpTq8208K1yRRw9M75oRjPyqKbfocRlcbJ52E%3D&reserved=0>
>     or visit our Facebook
>     <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.facebook.com%2Funiofleicester&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421308357&sdata=%2FqgkbkOy7%2Bbc%2BO2u08gWB0rm588m8Co5D175UpQbaDA%3D&reserved=0>
>     page
>
>
>
>     _______________________________________________
>
>     ZendTo mailing list
>
>     ZendTo at zend.to  <mailto:ZendTo at zend.to>
>
>     http://jul.es/mailman/listinfo/zendto  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjul.es%2Fmailman%2Flistinfo%2Fzendto&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421318355&sdata=cddFTETdMlLg6ulqi4Vo5sY0YNcBS2x6T77x%2F2K0QHE%3D&reserved=0>
>
>
>
> Jules
> -- 
> Julian Field MEng CEng CITP MBCS MIEEE MACM
> 'All the art of living lies in a fine mingling of letting go,
>   and holding on.' - Henry Ellis
> www.Zend.To  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zend.to%2F&data=02%7C01%7Cliam.gretton%40leicester.ac.uk%7C10a0200a50b74a0857aa08d85ae773e7%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637359297421318355&sdata=ZKTQHmvprMarKK0a%2B2lK7Ft49HZL40Gpxtg43OEeypg%3D&reserved=0>
> Twitter: @JulesFM
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://jul.es/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CEng CITP MBCS MIEEE MACM

'There is always one moment in childhood when the door opens and
  lets the future in.' - Graham Greene

www.Zend.To
Twitter: @JulesFM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20200930/5b5d5ad1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3340 bytes
Desc: not available
URL: <http://jul.es/pipermail/zendto/attachments/20200930/5b5d5ad1/attachment-0001.gif>


More information about the ZendTo mailing list