CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • "Data too long for column" error persists
Pages: [1]

Author Topic: "Data too long for column" error persists  (Read 666 times)

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
"Data too long for column" error persists
April 02, 2014, 05:52:52 am
Until 2 days ago we had been running 4.2 since its release.

We had a custom field with db length 10.  This was included in a profile on a semi-public contribution page.  Unbeknownst to me, some people were actually entering more than 10 characters into the field, but it was just being truncated when it was saved and the contributions were completing successfully.


Since updating to 4.4 however, if someone enters more than 10 characters the contribution fails with the error "Data too long for column ..." . The error message is OK - for this field I would prefer the previous behaviour of truncating rather than the contribution failing, but perhaps that isn't always appropriate, so I can't really complain.

Where it is all coming unstuck though is in solving the problem.

I edited the custom field through the UI and increased it's length to 50 - no improvement - the contribution page still works when I enter 10 or less characters but fails for more than 10 with the same error message.

I edited the profile reselecting the field and changing the field name before I saved so that there was actually a difference to save - no improvement.

I checked and the relevant table in the db ( civicrm_value_...) shows the field length as 50 for that column.

I cleared All caches in drupal and via administer>system settings >cleanup caches... in Civi. (Starting to get desperate now) Still no difference.

What's my next step?




Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "Data too long for column" error persists
April 02, 2014, 12:31:45 pm

by any chance are you using logging? can u check if the logging tables have the old schema values vs the new schema values?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: "Data too long for column" error persists
April 02, 2014, 04:46:35 pm
Yes, we have logging on and yes the field length in the log_civicrm_value.. table is still set to 10 not 50. 

Turning logging off and then on again didn't help.

Can I change the field length manually in the table ( I can do that) or does some file have to be deleted and recreated (Eileen will have to do that for me)?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "Data too long for column" error persists
April 02, 2014, 05:59:34 pm

for the short term changing the field manually is the best solution

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: "Data too long for column" error persists
April 02, 2014, 07:13:25 pm
Success!  Thanks Lobo.

I understand that "Logging functionality is currently in beta."  and this is likely to be one of the reasons why.   

Can we put a warning somewhere on the edit custom fields form that says something like " if you are have logging enabled and want to change custom field length go  to this URL for more details."

Then have a page somewhere on the document wiki reminding them that logging is still in beta and explaining that changing the size of the field in the relevant log_civicrm_value  table needs to be done manually for now. ending with  "ask your implementer/developer to do it if you can't"


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • "Data too long for column" error persists

This forum was archived on 2017-11-26.