Hello!

This is very awesome module, thank you for your hard work!

There's one thing I noticed when creating kind of huge table (6 columns, 300+ rows) with this module:

Type of this field in the database is 'text', and since it doesn't allow very much stuff in it, there is some limitations. Now it just cuts the serialized value to fit in 65535 characters, and instead of showing the table, it prints out lots of serialized data on the node's page.

Maybe tables of this size aren't very common, but maybe it should be good to make sure that it is possible.

Comments

kevin hankens’s picture

Yeah that's a good point. The D7 version defines the schema as "big text", so that would probably be a good backport. If you need to adjust it yourself, you can look at the function tablefield_field_settings() inside of the 'database columns' section and experiment with 'size' entry for $columns['value']. I don't have a ton of time right now, so I'll have to throw that on the back burner.

Hope that helps!

isampo’s picture

Allright, that's the solution that I ended up with also. But good to know that it's fixed in the future. Keep up the good work!

fxarte’s picture

I think you designed that way, but what about storing each file row in its own table row? Instead of the whole file in a cell?
Something like:

file.csv:
name, id
John,1
Peter,2

to:


nid,vid,field_table_value
3002,3002,[serialized(name, id)]
3002,3002,[serialized(John,1)]
3002,3002,[serialized(Peter,2)]

Thanks

fxarte’s picture

MySQL5.0 says that a longtext field type should hold up to 4GB of data, this should enough for most data.
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html

jenlampton’s picture

Version: 6.x-1.2 » 7.x-3.0
Issue summary: View changes

I'm running into this problem on a Drupal 7 site as well. The error messages I see when I attempt to load content are:

    field_table cannot be longer than 2048 characters but is currently 3308 characters long.
    field_table cannot be longer than 2048 characters but is currently 3239 characters long.
    field_table cannot be longer than 2048 characters but is currently 8474 characters long.

I have three rows that contain more data than is allowed to be stored. By deleting those three rows, my tablefield saves as expected.

jenlampton’s picture

Status: Active » Fixed

Ah, updating to the latest 3.x version of the module provides options for this :) Closing this issue as fixed in 7.x.

lolandese’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.