Announcement

Collapse
No announcement yet.

Weird bug in Preferences

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weird bug in Preferences

    Hello, we have the weirdest bug that has been carried on for ages now, which crashes the preferences view. It happens up to version 8.3.5 and affects old accounts. New accounts seems not to be affected. I have not been able to reproduce this error in other instances. Currently we are running 8.3.5 with docker.

    This error shows in the browser console. The preferences view does not show.

    Click image for larger version

Name:	image.png
Views:	102
Size:	23.6 KB
ID:	109123

    ​I managed to track this error down to the espo-main.js file in client/lib on Line 35, Col 302019.
    I added the trusty old console.log before the statement to see what is happening.

    Click image for larger version

Name:	image.png
Views:	48
Size:	25.9 KB
ID:	109124

    And here is the one "array" to blame.

    Click image for larger version

Name:	image.png
Views:	49
Size:	41.2 KB
ID:	109125

    Clearly this forEach cannot be used on {0: 'Meeting', 1: 'Call', 2: 'Email', 3: 'BpmnUserTask', 5: 'Task'}, so I just applied a little fix to see if it works now.

    Click image for larger version

Name:	image.png
Views:	49
Size:	26.7 KB
ID:	109126

    ....Aaaand voilá, now the error does not happen and the preferences view is finally shown.

    Click image for larger version

Name:	image.png
Views:	48
Size:	21.7 KB
ID:	109127​​

    ​​Anyways... of course this fix will not survive upgrades, so... does anyone knows where does that object ({0: 'Meeting'...}) is coming from?

    Thanks for listening to my TED talk.

    (PS. I took more screenshots but only a maximum of 5 are allowed)

  • #2
    The question is how it happened that an Object got stored instead of array. What field is it? "assignmentNotificationsIgnoreEntityTypeList" ?

    Comment


    • #3
      Maybe a non array (or non-list) value is set it data/config.php.

      Comment


      • #4
        yuri thanks for your guidance. I now can see clearly where was the problem. It was this array in data/config shown in the screenshot, which had a wrong last index, god knows why. I corrected it and everything works just fine now.

        Click image for larger version

Name:	image.png
Views:	68
Size:	9.0 KB
ID:	109157

        I checked everywhere but data/co​nfig, even the preferences object stored in the database, and seems that I took the hardest path to debugging it .

        Thank you very much again, yuri.

        Comment


        • #5
          It could be caused either by some old bug (that might have been fixed long ago) or the "4" line was removed manually by a human.

          Comment

          Working...
          X