Hi,

I wanted to find out if you will be open to support longtext in value field ( second field )? We have been getting column too short error. I can hash out a patch in couple of days but wanted to confirm with you if will be open to accept it. I think it will be more useful to model key => value use case for most of the people.

This is the error I got:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column

Comments

chi’s picture

Status: Active » Postponed (maintainer needs more info)

What kind of data you are using in your site? Do you use double text field widget to submit this data?
By which way have you got this error?

dipen chaudhary’s picture

basically my data is too long to fit in varchar - data I tried to fit in is -

Adapted from <nlm:ext-link xmlns:nlm="http://schema.highwire.org/NLM/Journal" xmlns:hwp="http://schema.highwire.org/Journal" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:l="http://schema.highwire.org/Linking" l:rel="related" l:ref-type="uri" l:ref="http://www.cshlpress.com/link/imagingneurop.htm" ext-link-type="uri" xlink:href="http://www.cshlpress.com/link/imagingneurop.htm" xlink:type="simple" hwp:id="ext-link-1">Drosophila <nlm:italic>Protocols</nlm:italic></nlm:ext-link> (ed. Sullivan et al.). CSHL Press, Cold Spring Harbor, NY, USA, 2000.

Thats why wondered if you will accept a patch for long text as the second field ( value field? ).

phayes’s picture

Just want to chime in here: I think many people would like to use double field as a key => value store. *Optionally* making the second column a longtext would be awesome. Without, it chops off a whole bunch of functionality for double_field.

Thanks for the great module!

dipen chaudhary’s picture

To answer your question, I fill in the data via code so It doesn't throw form validation errors if thats what you mean.

chi’s picture

Status: Postponed (maintainer needs more info) » Needs work

OK, but I still suppose that double field should be symmetrical, so both subfields needs support longtext values.

phayes’s picture

Hi Chi, so would you be open to such a patch? Dipen and I will get started on it and post it here when it's ready for review. Thanks!

chi’s picture

Yup, assign this issue to yourself.

chi’s picture

Any progress?

preid’s picture

This fix would make Double Field perfect for my project. I eagerly await the patch!

phayes’s picture

We're still finding time to do it. It will come eventually!

chi’s picture

Status: Needs work » Closed (fixed)

Commited to 2.x. Please, test it and confirm that it works as expected.