View Issue Details

IDProjectCategoryView StatusLast Update
0034359mantisbtapi restpublic2024-05-12 12:34
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.11.0 
Target Version2.26.2Fixed in Version2.26.2 
Summary0034359: REST API: "String not found" warning when adding note with invalid view_state
Description

When helper_parse_view_state() throws an exception due to the invalid view state, Mantis throws an additional warning 300 (ERROR_LANG_STRING_NOT_FOUND) in lang_get( $p_string = 'view_state', $p_lang = ??? ) .../helper_api.php: 795

Steps To Reproduce

POST /api/rest/issues/{{id}}/notes

{
  "text": "test note",
  "view_state": {
    "name": "non-existing-view-state"
  }
}
TagsNo tags attached.

Relationships

related to 0034348 closeddregad Adding issue note with REST API returns HTTP 500 when given view_state is invalid 

Activities

Related Changesets

MantisBT: master-2.26 8365ddf9

2024-03-24 11:32

dregad


Details Diff
Use correct language string for bugnote view state

Lanuage string `view_state` does not exist. This was causing application
error 300 ERROR_LANG_STRING_NOT_FOUND to be triggered if one of the
invalid states were reached.

Replacing invalid string by `bugnote_view_state`.

Fixes 0034359
Affected Issues
0034359
mod - core/helper_api.php Diff File