Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Listing module (Auflistung) - cancel 255 character limitation for 'list_info' #7004

Closed
Anke opened this issue May 16, 2014 · 6 comments
Closed
Labels

Comments

@Anke
Copy link

Anke commented May 16, 2014

Please change field 'list_info' in tl_modules from 'varchar(255)' to 'text'.

A field list of 255 characters may be good enough for simple contact forms but not for larger forms. Many of my clients have various application forms with more than 20 fields, but since one of the last updates the list of selected fields for the details page is cut short by this limitation, preventing complete data-listings.

I already posted this here #6344, but I think this is rather important.

@ghost
Copy link

ghost commented May 16, 2014

@Anke: you're right, I have the same problems.
But you can fix this yourself by adding the following lines to config/dcaconfig.php

$GLOBALS['TL_DCA']['tl_module']['fields']['list_fields']['eval']['maxlength'] = 1024;
$GLOBALS['TL_DCA']['tl_module']['fields']['list_fields']['sql'] = "varchar(1024) NOT NULL default ''";

1024 should be ample but you can set a larger number as well.
Run install.php once after modifing dcaconfig so that the database table ist updated.

Nevertheless, the core should already provide a larger value than 255 (1024 suggested).

@Anke
Copy link
Author

Anke commented May 16, 2014

Quite frankly, though, with 1024 I'd be in trouble again, currently with at least one customer's form. A size of 2048 would be comfortable, I guess.
Actually I'm using EFG's formdata-listing module which is also using the list_info field, setting it to "text NULL". But it is overridden by the listing module's SQL statement.

I posted this issue on Bitbucket (https://bitbucket.org/thk/efg/issue/62/sql-befehl-f-r-list_info-wird-vom-core) as well. Maybe formdata-listing ought to use its own field instead of using list_info ...?

Thanks for sharing the dca fix, Thomas. Is a varchar field, if limited to 2048 bytes, still smaller than a text field?

@ghost
Copy link

ghost commented May 17, 2014

@Anke: The conflict between EFG and Listing is caused by a. EFG trying to use and modifiy a Listing field and b. the extension EFG being loaded before Listing. So you will need to use your local dcaconfig.

A TEXT field is like a BLOB (should be called CLOB) and, except for a small initial part, stored outside the normal row data, so it has some extra overhead. In your case, I'd suggest you use varchar.
If your are interested in technical background, look here:
http://dev.mysql.com/doc/refman/5.5/en/blob.html
http://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html

S.a. #1777.

@Anke
Copy link
Author

Anke commented May 17, 2014

Ah, ja, danke. Lang ist's her ...

@leofeyer
Copy link
Member

This is actually a bug in the EFG extension. It the extensions requires the listing module, because it uses a field defined by it, it should make the listing module a dependency in the autoload.ini file. Then the DCA field definition will have precedence over the default one.

@Anke
Copy link
Author

Anke commented May 23, 2014

But aside from EFG - isn't the core listing module restricting longer lists and respectively complex forms?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants