When a comment contains an 'enter' it is not possible to edit the comment - Forum - Rollbase - Progress Community

When a comment contains an 'enter' it is not possible to edit the comment

 Forum

When a comment contains an 'enter' it is not possible to edit the comment

This question is answered

Rollbase version 4.1.0.0 private cloud

I have an object with the possibility to log comments. When the text of the comment contains an "enter" it is not possible to edit the comment. Is this a known error?

comment:

error:

stack:

Uncaught SyntaxError: Invalid or unexpected token
rb-ui.js?v=4.1.0.0:815 Page Localization Details - Set Culture: 821364_267315-nl


commentEdit.jsp?objName=contract&id=833946&commId=88656:677

Uncaught TypeError: Cannot read property 'focus' of undefined(anonymous function) @ commentEdit.jsp?objName=contract&id=833946&commId=88656:677c @ jquery.min.js?v=4.1.0.0:3fireWith @ jquery.min.js?v=4.1.0.0:3ready @ jquery.min.js?v=4.1.0.0:3H @ jquery.min.js?v=4.1.0.0:3

Verified Answer
  • Thank you for reporting this bug. Happens in the new UI only.

    While this is fixed officially, here is a workaround that you can use:
    In file commentEdit.jsp (<path_to_tomcat>/webapps/prod/m/commentEdit.jsp)

    look for a section with the following content

    <script>
    ...
    	"value" : "<textarea rows=10 cols=92 name='comment'><%=HtmlUtil.encode(comm != null ? comm.getComment() : "")%></textarea><br><span class='rbs_alertMsg' id='comment_error'></span>"
    ...
    </script>

    and replace it with this

    <script>
    ...
    "value" : `<textarea rows=10 cols=92 name='comment'><%=HtmlUtil.encode(comm != null ? comm.getComment() : "")%></textarea><br><span class='rbs_alertMsg' id='comment_error'></span>` ...
    </script>

    i.e. replace the value's enclosing double-quotes with back-ticks. Do this for all occurrences of commentEdit.jsp (master and all prods)
    That should do the trick. Let me know if this works for you.

All Replies
  • Thank you for reporting this bug. Happens in the new UI only.

    While this is fixed officially, here is a workaround that you can use:
    In file commentEdit.jsp (<path_to_tomcat>/webapps/prod/m/commentEdit.jsp)

    look for a section with the following content

    <script>
    ...
    	"value" : "<textarea rows=10 cols=92 name='comment'><%=HtmlUtil.encode(comm != null ? comm.getComment() : "")%></textarea><br><span class='rbs_alertMsg' id='comment_error'></span>"
    ...
    </script>

    and replace it with this

    <script>
    ...
    "value" : `<textarea rows=10 cols=92 name='comment'><%=HtmlUtil.encode(comm != null ? comm.getComment() : "")%></textarea><br><span class='rbs_alertMsg' id='comment_error'></span>` ...
    </script>

    i.e. replace the value's enclosing double-quotes with back-ticks. Do this for all occurrences of commentEdit.jsp (master and all prods)
    That should do the trick. Let me know if this works for you.

  • Hi Santosh,

    Thanks for the workaround, We'll try this on our development enviroment.

  • To confirm, this workaroud works!