Page 1 of 1

Custom SCRIPT type field limited lenght

PostPosted: Mon Sep 19, 2016 10:10 am
by dspaan
I've created a custom field of the SCRIPT type. But it seems this field had a limit on the amount of characters, where can i change this limit?

Versie: 2.12b0.5
SVN Version: 2526
DB Schema Version: 1458
DB Schema Update Date: 2016-04-29 19:33:02

Re: Custom SCRIPT type field limited lenght

PostPosted: Sun Nov 13, 2016 2:39 pm
by williamconley
That limitation will likely be hard-coded into the "vicidial.php" agent screen.

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Nov 16, 2016 5:12 am
by dspaan
Yes, but i was hoping anyone could say which line in the code i'd have to change.

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Nov 16, 2016 6:50 am
by mflorell
The database field is a VARCHAR(5000), so it is limited to 5000 characters. There is no pre-set limit in the PHP programming.

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Dec 21, 2016 2:13 am
by williamconley
mflorell wrote:The database field is a VARCHAR(5000), so it is limited to 5000 characters. There is no pre-set limit in the PHP programming.

Do you think it would break anything to convert this field to "TEXT" instead of VarChar?

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Dec 21, 2016 7:44 am
by mflorell
Good question, give it a try and let us know :)

Re: Custom SCRIPT type field limited lenght

PostPosted: Sun Jan 22, 2017 3:35 am
by williamconley
We've changed a lot of fields to TEXT in various installs. Just not this one.

In fact, we extended some client's capability in Lime Survey to beyond 85 custom fields by altering their "create new field" script to use TEXT instead of VARCHAR. Some customers want to have a couple hundred custom fields, and the default lime survey method would always crash after 85 due to the number of bytes in the field addressing. But TEXT creates a BLOB field with 4 bytes if I recall. Does add burden to the system when running to access the data in the BLOBs, but that hasn't proven to be notable so they're all happy.

But in Vicidial, we have expanded several fields and changed several to TEXT without any known hiccups yet. Just not that one.

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Feb 19, 2020 10:09 am
by ghernandez
williamconley wrote:We've changed a lot of fields to TEXT in various installs. Just not this one.

In fact, we extended some client's capability in Lime Survey to beyond 85 custom fields by altering their "create new field" script to use TEXT instead of VARCHAR. Some customers want to have a couple hundred custom fields, and the default lime survey method would always crash after 85 due to the number of bytes in the field addressing. But TEXT creates a BLOB field with 4 bytes if I recall. Does add burden to the system when running to access the data in the BLOBs, but that hasn't proven to be notable so they're all happy.

But in Vicidial, we have expanded several fields and changed several to TEXT without any known hiccups yet. Just not that one.




Williamconley - any fix to extend the field limitation?

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Feb 19, 2020 1:20 pm
by williamconley
Which field limitations? Field Type? Field Count? What?

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Feb 19, 2020 2:10 pm
by ghernandez
williamconley wrote:Which field limitations? Field Type? Field Count? What?



The script field for the campaign.

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Feb 19, 2020 2:19 pm
by williamconley
That exists in two places basically: MySQL has a table for vicidial_campaigns which has a field for the script. That field has a length. Yes, you can change it. PHP also draws the field onto the page in the Modify Scripts area of the Admin.php page. I don't know if that has any extra limitations or not, but yes you can also alter that length if it has limitations.

Re: Custom SCRIPT type field limited lenght

PostPosted: Wed Feb 19, 2020 3:09 pm
by ghernandez
williamconley wrote:That exists in two places basically: MySQL has a table for vicidial_campaigns which has a field for the script. That field has a length. Yes, you can change it. PHP also draws the field onto the page in the Modify Scripts area of the Admin.php page. I don't know if that has any extra limitations or not, but yes you can also alter that length if it has limitations.





Noted, thanks.