# Modified History too long Error

**URL:** <https://community.open-emr.org/t/modified-history-too-long-error/893>\
**Category:** Management and Administration\
**Created:** [October 25, 2011, 2:17am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893 "2011-10-25T02:17:01Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 25, 2011, 2:17am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/1 "2011-10-25T02:17:01Z")

</div>

**[ajperezcrespo](https://sourceforge.net/u/ajperezcrespo/)** wrote on [Tuesday, October 25, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#1743):

Hi,

&nbsp;&nbsp; We modified the History Layout by adding a few fields and the following error shows up when saving.  
ERROR: field ‘Other\_Cancer’&nbsp; is too long:  
Maternal Aunt:|Maternal Grandmother:|…and other options from the assigned list.  
Data Type is Textbox List.

I just took a look and noticed that size is set to 0.&nbsp; Should it be something else?

Thanks

Ubuntu 11  
OEMR 4.0

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 25, 2011, 9:34pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/2 "2011-10-25T21:34:21Z")

</div>

**[ajperezcrespo](https://sourceforge.net/u/ajperezcrespo/)** wrote on [Tuesday, October 25, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#af9b):

Well that did not work.&nbsp; But here is what I found in the Errror Log.

&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/main/left\_nav.php](http://10.0.0.72/openemr/interface/main/left_nav.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/main/left\_nav.php](http://10.0.0.72/openemr/interface/main/left_nav.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/main/left\_nav.php](http://10.0.0.72/openemr/interface/main/left_nav.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/main/left\_nav.php](http://10.0.0.72/openemr/interface/main/left_nav.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/patient\_file/report/patient\_report.php](http://10.0.0.72/openemr/interface/patient_file/report/patient_report.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/patient\_file/report/custom\_report.php](http://10.0.0.72/openemr/interface/patient_file/report/custom_report.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/main/left\_nav.php](http://10.0.0.72/openemr/interface/main/left_nav.php)  
&nbsp;&nbsp; PHP Notice:&nbsp; Use of undefined constant relatives\_cancer - assumed ‘relatives\_cancer’ in /var/www/openemr/library/report.inc on line 65, referer: [http://10.0.0.72/openemr/interface/main/left\_nav.php](http://10.0.0.72/openemr/interface/main/left_nav.php)

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 26, 2011, 6:59am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/3 "2011-10-26T06:59:11Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Wednesday, October 26, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#6eb3):

Hi,  
Errors look benign and the size should be ok at 0, What does the structure of the mysql history\_data table look like?  
-brady

> **[OpenEMR](https://www.open-emr.org)**
>
> The world's leading open-source electronic medical record and practice management software.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 26, 2011, 3:32pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/4 "2011-10-26T15:32:00Z")

</div>

**[ajperezcrespo](https://sourceforge.net/u/ajperezcrespo/)** wrote on [Wednesday, October 26, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#57c9):

No data gets stored.

Here is the Structure  
`history_data` (  
&nbsp; `id` bigint(20) NOT NULL AUTO\_INCREMENT,  
&nbsp; `coffee` longtext,  
&nbsp; `tobacco` longtext,  
&nbsp; `alcohol` longtext,  
&nbsp; `sleep_patterns` longtext,  
&nbsp; `exercise_patterns` longtext,  
&nbsp; `seatbelt_use` longtext,  
&nbsp; `counseling` longtext,  
&nbsp; `hazardous_activities` longtext,  
&nbsp; `recreational_drugs` longtext,  
&nbsp; `last_breast_exam` varchar(255) DEFAULT NULL,  
&nbsp; `last_mammogram` varchar(255) DEFAULT NULL,  
&nbsp; `last_gynocological_exam` varchar(255) DEFAULT NULL,  
&nbsp; `last_rectal_exam` varchar(255) DEFAULT NULL,  
&nbsp; `last_prostate_exam` varchar(255) DEFAULT NULL,  
&nbsp; `last_physical_exam` varchar(255) DEFAULT NULL,  
&nbsp; `last_sigmoidoscopy_colonoscopy` varchar(255) DEFAULT NULL,  
&nbsp; `last_ecg` varchar(255) DEFAULT NULL,  
&nbsp; `last_cardiac_echo` varchar(255) DEFAULT NULL,  
&nbsp; `last_retinal` varchar(255) DEFAULT NULL,  
&nbsp; `last_fluvax` varchar(255) DEFAULT NULL,  
&nbsp; `last_pneuvax` varchar(255) DEFAULT NULL,  
&nbsp; `last_ldl` varchar(255) DEFAULT NULL,  
&nbsp; `last_hemoglobin` varchar(255) DEFAULT NULL,  
&nbsp; `last_psa` varchar(255) DEFAULT NULL,  
&nbsp; `last_exam_results` varchar(255) DEFAULT NULL,  
&nbsp; `relatives_cancer` longtext,  
&nbsp; `relatives_tuberculosis` longtext,  
&nbsp; `relatives_diabetes` longtext,  
&nbsp; `relatives_high_blood_pressure` longtext,  
&nbsp; `relatives_heart_problems` longtext,  
&nbsp; `relatives_stroke` longtext,  
&nbsp; `relatives_epilepsy` longtext,  
&nbsp; `relatives_mental_illness` longtext,  
&nbsp; `relatives_suicide` longtext,  
&nbsp; `cataract_surgery` datetime DEFAULT NULL,  
&nbsp; `tonsillectomy` datetime DEFAULT NULL,  
&nbsp; `cholecystestomy` datetime DEFAULT NULL,  
&nbsp; `heart_surgery` datetime DEFAULT NULL,  
&nbsp; `hysterectomy` datetime DEFAULT NULL,  
&nbsp; `hernia_repair` datetime DEFAULT NULL,  
&nbsp; `hip_replacement` datetime DEFAULT NULL,  
&nbsp; `knee_replacement` datetime DEFAULT NULL,  
&nbsp; `appendectomy` datetime DEFAULT NULL,  
&nbsp; `date` datetime DEFAULT NULL,  
&nbsp; `pid` bigint(20) NOT NULL DEFAULT ‘0’,  
&nbsp; `name_1` varchar(255) DEFAULT NULL,  
&nbsp; `value_1` varchar(255) DEFAULT NULL,  
&nbsp; `name_2` varchar(255) DEFAULT NULL,  
&nbsp; `value_2` varchar(255) DEFAULT NULL,  
&nbsp; `additional_history` text,  
&nbsp; `exams` text NOT NULL,  
&nbsp; `usertext11` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext12` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext13` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext14` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext15` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext16` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext17` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext18` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext19` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext20` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext21` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext22` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext23` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext24` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext25` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext26` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext27` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext28` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext29` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `usertext30` varchar(255) NOT NULL DEFAULT ‘’,  
&nbsp; `userdate11` date DEFAULT NULL,  
&nbsp; `userdate12` date DEFAULT NULL,  
&nbsp; `userdate13` date DEFAULT NULL,  
&nbsp; `userdate14` date DEFAULT NULL,  
&nbsp; `userdate15` date DEFAULT NULL,  
&nbsp; `breast_cancer` varchar(255) DEFAULT NULL,  
&nbsp; `ovarian_cancer` varchar(255) DEFAULT NULL,  
&nbsp; `Menarche` varchar(255) DEFAULT NULL,  
&nbsp; `First_Pregnancy` varchar(255) DEFAULT NULL,  
&nbsp; `Gesta` varchar(255) DEFAULT NULL,  
&nbsp; `LMP` varchar(255) DEFAULT NULL,  
&nbsp; `Para` varchar(255) DEFAULT NULL,  
&nbsp; `Breast_Feeding` varchar(255) DEFAULT NULL,  
&nbsp; `C_Section` varchar(255) DEFAULT NULL,  
&nbsp; `Bra_Size` varchar(255) DEFAULT NULL,  
&nbsp; `Abortion` varchar(255) DEFAULT NULL,  
&nbsp; `Endometrial_Cancer` varchar(255) DEFAULT NULL,  
&nbsp; `Other_Cancer` varchar(255) DEFAULT NULL,  
&nbsp; `rfother` varchar(255) DEFAULT NULL,  
&nbsp; `abnmamo` varchar(255) DEFAULT NULL,  
&nbsp; `abnsono` varchar(255) DEFAULT NULL,  
&nbsp; `abnbrstmri` varchar(255) DEFAULT NULL,  
&nbsp; `breastpain` varchar(255) DEFAULT NULL,  
&nbsp; `breastmass` varchar(255) DEFAULT NULL,  
&nbsp; `nippledis` varchar(255) DEFAULT NULL,  
&nbsp; `rtinbrstexam` varchar(255) DEFAULT NULL,  
&nbsp; `famdxbc` varchar(255) DEFAULT NULL,  
&nbsp; `prsnldxbrstex` varchar(255) DEFAULT NULL,  
&nbsp; `coments` varchar(255) DEFAULT NULL,  
&nbsp; `piother` varchar(255) DEFAULT NULL,

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 29, 2011, 8:47pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/5 "2011-10-29T20:47:09Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Saturday, October 29, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#56b0):

Hi,

This is coming from following code block in library/options.inc.php:

```
  // Better to die than to silently truncate data!
  if ($maxlength && ($data_type != 3 && $data_type != 34) && strlen($value) > $maxlength)
    die(htmlspecialchars( xl('ERROR: Field') . " '$field_id' " . xl('is too long'), ENT_NOQUOTES) .
    ":<br />&nbsp;<br />".htmlspecialchars( $value, ENT_NOQUOTES));

```

For the datatype (22), the $maxlength comes from the ‘max\_length’ field in the layout\_options sql row for this entry. Note if it is set to 0, then it should be 255. I may be mistaken, but I don’t think the max\_length is actually set in the layout editor, so it should be 255. Are you going over 255 characters?

-brady

> **[OpenEMR](https://www.open-emr.org)**
>
> The world's leading open-source electronic medical record and practice management software.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 29, 2011, 8:52pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/6 "2011-10-29T20:52:10Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Saturday, October 29, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#ebdf):

Hi,  
If you are indeed breaking 255 characters, then we should consider going through the datatypes and creating a TEXT mysql column for the ones that have potential to break this limit.  
-brady

> **[OpenEMR](https://www.open-emr.org)**
>
> The world's leading open-source electronic medical record and practice management software.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 9, 2011, 2:40am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/7 "2011-11-09T02:40:49Z")

</div>

**[markthepharaoh](https://sourceforge.net/u/markthepharaoh/)** wrote on [Wednesday, November 09, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#b59c):

Hi,

I am getting that same type of error any solution yet? I added few items to the exam list and when trying to write a note in the note field I get this the error below, I run 4.1 (2) on windows 7.&nbsp; Thanks. Mark  
ERROR: Field ‘exams’ is too long:

brs:0:|cec:0:|ecg:2:,11-10 |gyn:0:|mam:0:|phy:1:11-10|pro:2:11-10 (E)|rec:1:11-10(-)|sic:0:|ret:0:|flu:0:DECLINED 2010-01-05|pne:0:|ldl:2:11-10 (114), 01-10 (113)|hem:1:11-10, 01-10|psa:1:4-11(3.9),1-11(4.1),10-10 (5.7), 01-10 (4.5)|fobt:0:|bmd:0:|tsco:0:|hgac:0:|bun:0:|gfr:0:|microalbum:0:|tg:0:|spiro:0:

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 9, 2011, 11:48am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/8 "2011-11-09T11:48:33Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Wednesday, November 09, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#2068):

Hi,

This bug has not been fixed. The problem is that those mysql fields only hold 255 characters usually (unless set to TEXT), which is why the above code checks it, otherwise it would truncate the field (ie. lose/corrupt data) silently. I think the following needs to be done to safely deal with this bug(codebase changes).  
1) In the new items that have a chance of being bigger than 255 characters, have them create a TEXT mysql field (then can have thousands of characters)  
2) In the validation check above, rather than check based on the datatype, figure out if there is a way to check the maximum size of the column through mysql (not sure if this can be done). This is important, because, solution in step 1 above will only fix it for users that create new columns; we still need to support/validate the older smaller columns.

Hope this makes some sense.  
-brady

> **[OpenEMR](https://www.open-emr.org)**
>
> The world's leading open-source electronic medical record and practice management software.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 9, 2011, 2:06pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/9 "2011-11-09T14:06:37Z")

</div>

**[ajperezcrespo](https://sourceforge.net/u/ajperezcrespo/)** wrote on [Wednesday, November 09, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#4c20):

Hi,  
&nbsp;&nbsp; Here is a quick easy fix which worked for me.  
Go to Administration-\>lists-\>Exams and shorten&nbsp; the names in the ID column.&nbsp;&nbsp; Try and get the it to well below 255 so that it is useable.

Alfonso

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 9, 2011, 5:15pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/10 "2011-11-09T17:15:02Z")

</div>

**[sunsetsystems](https://sourceforge.net/u/sunsetsystems/)** wrote on [Wednesday, November 09, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#304d):

This issue was fixed for LBF forms a while back, by changing the lbf\_data.field\_value type to “text”.&nbsp; So what I’d suggest is having the layout management logic use that type when creating new fields that aggregate data… I think that is also what Brady suggested.

Rod  
[www.sunsetsystems.com](http://www.sunsetsystems.com)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 13, 2011, 3:20am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/11 "2011-11-13T03:20:42Z")

</div>

**[markthepharaoh](https://sourceforge.net/u/markthepharaoh/)** wrote on [Sunday, November 13, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#c7ae):

Rod,

Can you please clarify, which field "the lbf\_data.field\_value type to “text”. "&nbsp; and how I can make “the management logic use that type when creating new fields that aggregate data”.

Thanks

Mark

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 13, 2011, 7:55am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/12 "2011-11-13T07:55:14Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Sunday, November 13, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#497d):

Rod,

But won’t these datafields with the LBF still show the error? Although they have been changed to TEXT mysql fields, the validation will still break it, correct? I think this is what makes this issues a bit sticky. Even if we were to have all new elements created via the layout editor TEXT (like the LBF currently is), we are still stuck with the issue of ensuring the current and previously created elements via the layout editor do not break(ie. silently lose data if try to insert more data thatn the mysql column can hold). Thinking that instead of going by the datatype, maybe it’s best to do something like here for each entry to ensure the user does not try to insert something over the size limit of the mysql column:  
[http://php.net/manual/en/function.mysql-field-type.php](http://php.net/manual/en/function.mysql-field-type.php)

-brady

> **[OpenEMR](https://www.open-emr.org)**
>
> The world's leading open-source electronic medical record and practice management software.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 13, 2011, 8:10am UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/13 "2011-11-13T08:10:39Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Sunday, November 13, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#b55e):

More to add from previous post,

Actually, if we just make a wrapper for the [http://php.net/manual/en/function.mysql-field-len.php](http://php.net/manual/en/function.mysql-field-len.php) function in library/sql.inc which could takes as input the table and column name(and returns the maximum length of the field), should be able to work something in that checks this instead for validation on each data field for the insert. Then if the error gets thrown, it’s easy to fix (user increases the size of the field in mysql). Something to look out for here is that it appears would need to do a correction if the field is in UTF8 (divide the length by 3).

-brady

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [November 13, 2011, 4:19pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/14 "2011-11-13T16:19:26Z")

</div>

**[sunsetsystems](https://sourceforge.net/u/sunsetsystems/)** wrote on [Sunday, November 13, 2011](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#2fc7):

Brady, what I had in mind (and neglected to state) for the rest of the solution was adding max\_length to the layout editor. It is also desirable as the row count for multi-line text fields. Additional checking against the mysql maximum length does seem like a good idea.  
Rod  
[www.sunsetsystems.com](http://www.sunsetsystems.com)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [May 8, 2012, 5:19pm UTC](https://community.open-emr.org/t/modified-history-too-long-error/893/15 "2012-05-08T17:19:32Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Tuesday, May 08, 2012](https://sourceforge.net/p/openemr/discussion/202505/thread/5afb83ba/#c20a):

bump,  
Hoping to get this bug fixed before the next release:  
[http://open-emr.org/wiki/index.php/Active\_Projects#Datafield\_Max\_Length\_Bug](http://open-emr.org/wiki/index.php/Active_Projects#Datafield_Max_Length_Bug)  
-brady  
[OpenEMR](http://www.open-emr.org/)
