151 Posts
jimenaes
8 years ago
8
Topic

Hi

I'm using the field Script (JS) from the Code Pack plugin to add classes to my CT content view and it woks fine if my code has 66 lines but if I add one more it doesn't. Is there something like a size limit for this fields? 

Thanks

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
2
Level 1

Hi,

field itself does not have any limits, only limit I can think of is database limit of 2048 characters - try changing #__cck_core_fields column defaultvalue to type text (now it is varchar(2048) which imposes this limit). 

As always with such experimental changes - backup before you do anything!

151 Posts
jimenaes
8 years ago
0
Level 2

Thanks Klas I'll try it

151 Posts
jimenaes
8 years ago
0
Level 2

I tried it but didn't work. I changed the character limit but didn't find where to change the type value. Although I change the character limit to 5000 or more the limit still 2048. I had to make several js code fields to place all the code :(

4229 Posts
Kadministrator
8 years ago
4
Level 1

This should be done directly in the database, character limit means nothing if there is not enough space to store it into database.

Don't forget to backup your database before doing any changes.

6 years ago
3
Level 2

I've just hit this issue as well and having multiple Script JS fields on the form didn't work in my case. Is it possible to have the data type updated to TEXT for the defaultvalue column as part of a future release? I will adjust the column datatype manually as a solution for now.

4229 Posts
Kadministrator
6 years ago
2
Level 3

You should make a pull request on a github

6 years ago
1
Level 4

Have created a PR here.

4229 Posts
Kadministrator
6 years ago
0
Level 5

thnx

Get a VIP membership