How long the "long text" data element can be post?

Hi,all,
In my DHIS2 Instance–dhis2 2.40.3, tomcat-9
about the text value type : from the doc , I got this:
f99514fc6296e53e1f406a35350150b

but when I post the data with more than about 1150 chinese words, got this :

update error

server failed to update tracker entity instance 服务器更新跟踪实体实例失败
An error occurred, please check import summary.

Even if I change the data type to long text, the same error still occurs.
but I tested in the dhis2 demo server, there canbe post more text words.

why,how ?

thanks

Okay, so the same text (data value) and metadata is being saved in play but not in your instance? Is your instance URL much longer that that of the demo server?

Could you get the details of the error from the network request and the console?

NO, THE URL Is shorter. just like :slight_smile:
https://fw.xxxx.cn:88/api

I can’t got the more detail error info from catalina.out.

I test in dhis-web-tracker-capture app. enter a entity attribute with text or long text value type.

got : 注册错误(Register error)

An error occurred, please check import summary.

1 Like

Okay, thanks! What about the Network request in the browser DevTools (F12 → Network)? You need to open it only one step before the error and then perform the action, the request will be sent, check out the one with the error. Thanks!

请求网址: https://fw.xxx.cn:88/api/trackedEntityInstances

请求方法:POST

状态代码:409 Conflict
found this:
===Value exceeds the character limit of 1200 characters:====

{
“httpStatus”: “Conflict”,
“httpStatusCode”: 409,
“status”: “ERROR”,
“message”: “An error occurred, please check import summary.”,
“response”: {
“responseType”: “ImportSummaries”,
“status”: “ERROR”,
“imported”: 0,
“updated”: 0,
“deleted”: 0,
“ignored”: 1,
“importOptions”: {
“idSchemes”: {},
“dryRun”: false,
“async”: false,
“importStrategy”: “CREATE_AND_UPDATE”,
“mergeMode”: “REPLACE”,
“reportMode”: “FULL”,
“skipExistingCheck”: false,
“sharing”: false,
“skipNotifications”: false,
“skipAudit”: false,
“datasetAllowsPeriods”: false,
“strictPeriods”: false,
“strictDataElements”: false,
“strictCategoryOptionCombos”: false,
“strictAttributeOptionCombos”: false,
“strictOrganisationUnits”: false,
“strictDataSetApproval”: false,
“strictDataSetLocking”: false,
“strictDataSetInputPeriods”: false,
“requireCategoryOptionCombo”: false,
“requireAttributeOptionCombo”: false,
“skipPatternValidation”: false,
“ignoreEmptyCollection”: false,
“force”: false,
“firstRowIsHeader”: true,
“skipLastUpdated”: true,
“mergeDataValues”: false,
“skipCache”: false
},
“importSummaries”: [
{
“responseType”: “ImportSummary”,
“status”: “ERROR”,
“importOptions”: {
“idSchemes”: {},
“dryRun”: false,
“async”: false,
“importStrategy”: “CREATE_AND_UPDATE”,
“mergeMode”: “REPLACE”,
“reportMode”: “FULL”,
“skipExistingCheck”: false,
“sharing”: false,
“skipNotifications”: false,
“skipAudit”: false,
“datasetAllowsPeriods”: false,
“strictPeriods”: false,
“strictDataElements”: false,
“strictCategoryOptionCombos”: false,
“strictAttributeOptionCombos”: false,
“strictOrganisationUnits”: false,
“strictDataSetApproval”: false,
“strictDataSetLocking”: false,
“strictDataSetInputPeriods”: false,
“requireCategoryOptionCombo”: false,
“requireAttributeOptionCombo”: false,
“skipPatternValidation”: false,
“ignoreEmptyCollection”: false,
“force”: false,
“firstRowIsHeader”: true,
“skipLastUpdated”: true,
“mergeDataValues”: false,
“skipCache”: false
},
“importCount”: {
“imported”: 0,
“updated”: 0,
“ignored”: 1,
“deleted”: 0
},
“conflicts”: [
{
“object”: “Attribute.value”,
“value”: “Value exceeds the character limit of 1200 characters: ‘跳转到主要内容\n工具栏项目编辑\n管理\n管理菜单(下…’”
},
{
“object”: “Attribute.value”,
“value”: “Value exceeds the character limit of 1200 characters: ‘跳转到主要内容 工具栏项目编辑 管理 管理菜单(下…’”
}
],
“rejectedIndexes”: ,
“enrollments”: {
“responseType”: “ImportSummaries”,
“status”: “SUCCESS”,
“imported”: 0,
“updated”: 0,
“deleted”: 0,
“ignored”: 0,
“importSummaries”: ,
“total”: 0
}
}
],
“total”: 1
}
}

Put an event for have a long text value type of DE :
angular.js:9866

   PUT https://fw.xxx.cn:88/api/events/kkiF9BSREb0 409 (Conflict)

请求网址: https://fw.xxx.cn:88/api/events/kkiF9BSREb0

请求方法:PUT

状态代码: 409 Conflict

===========
{
“httpStatus”: “Conflict”,
“httpStatusCode”: 409,
“status”: “ERROR”,
“message”: “An error occurred, please check import summary.”,
“response”: {
“responseType”: “ImportSummary”,
“status”: “ERROR”,
“importOptions”: {
“idSchemes”: {},
“dryRun”: false,
“async”: false,
“importStrategy”: “CREATE_AND_UPDATE”,
“mergeMode”: “REPLACE”,
“reportMode”: “FULL”,
“skipExistingCheck”: false,
“sharing”: false,
“skipNotifications”: false,
“skipAudit”: false,
“datasetAllowsPeriods”: false,
“strictPeriods”: false,
“strictDataElements”: false,
“strictCategoryOptionCombos”: false,
“strictAttributeOptionCombos”: false,
“strictOrganisationUnits”: false,
“strictDataSetApproval”: false,
“strictDataSetLocking”: false,
“strictDataSetInputPeriods”: false,
“requireCategoryOptionCombo”: false,
“requireAttributeOptionCombo”: false,
“skipPatternValidation”: false,
“ignoreEmptyCollection”: false,
“force”: false,
“firstRowIsHeader”: true,
“skipLastUpdated”: false,
“mergeDataValues”: false,
“skipCache”: false
},
“importCount”: {
“imported”: 0,
“updated”: 0,
“ignored”: 1,
“deleted”: 0
},
“conflicts”: [
{
“object”: “plnQpdTFfW3”,
“value”: “value_length_greater_than_max_length”
}
],
“rejectedIndexes”: ,
“reference”: “kkiF9BSREb0”
}
}
========= payload:==========

  1. {dataValues: [{,…}], event: “kkiF9BSREb0”, program: “UeEjY04Jxnu”, programStage: “zKEmjeRoEmP”,…}

  2. completedDate: “2024-06-29”

  3. dataValues: [{,…}]

1. 0: {,…}

  1. dataElement: "plnQpdTFfW3"
  2. value: "跳转到主要内容\n工具栏项目编辑\n管理\n管理菜单(下拉)\n内容\n结构\n外观\n扩展\n配
  1. dueDate: “2024-06-29”
  2. event: “kkiF9BSREb0”
  3. eventDate: “2024-06-29”
  4. orgUnit: “lSPcPvUUFNI”
  5. program: “UeEjY04Jxnu”
  6. programStage: “zKEmjeRoEmP”
  7. status: “COMPLETED”
  8. trackedEntityInstance: “zI9Y9wS4wAY”
    =============

maybe limit is :

long text in entity attribute can’t post/put more than 1200 words.
long text in event DE can’t post more than 50000 words.

but this is not the designed goal.

Hi again @linxd
Thanks for the info…

I found this: Important database upgrade for tracker performance

Thanks

1 Like