"Uncaught TypeError" while editing the stream comments for all the entities.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Prathyush Shetty
    Junior Member
    • Oct 2023
    • 22

    "Uncaught TypeError" while editing the stream comments for all the entities.

    Hey, when I try to edit and save a stream comment, it throws me this error.

    Uncaught TypeError: Cannot read properties of undefined (reading 'then')
    at o.actionSave (espo-main.js:36313:21)
    at Object.handleAction (espo-main.js:5070:22)
    at s.onClick (espo-main.js:20055:22)
    at HTMLButtonElement.<anonymous> (espo-main.js:14512:38)
    at HTMLButtonElement.dispatch (jquery.js:5146:27)
    at f.handle (jquery.js:4950:28)​

    The above error points towards the "editView.save().then(() => {//code//})" line present in the core function "actionSave" { espocrm/client/src/views/modals/edit.js }.
    EditView variable contains valid data. It seems like there's some problem with the "then" function, because of this error, the dialog box fails to close.

    If I overwrite the same function in some custom file, remove the "then" function, and copy-paste the rest of the code after the save function, it works fine. It looks something like this after my changes -> "editView.save(); //code//".

    Please let know me know the use of this "then" function and why is throwing error.
  • yuri
    Member
    • Mar 2014
    • 8455

    #2
    What is "stream comment"? Is it a functionality added by an extension?
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • Prathyush Shetty
      Junior Member
      • Oct 2023
      • 22

      #3
      By stream comment, I actually meant the note entity.
      Attached Files

      Comment

      • yuri
        Member
        • Mar 2014
        • 8455

        #4
        The error does not happen to me. Is your instance in developer mode? Maybe you have some not-actual to the installed version files.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        Working...