Announcement

Collapse
No announcement yet.

Error after upgrading to 4.7.1: label.replace is not a function

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

  • Error after upgrading to 4.7.1: label.replace is not a function

    We were unable to open some contacts after upgrading to EspoCRM 4.7.1 (may have been introduced earlier, we skipped two versions) due to a Javascript error. The error originated in client/src/views/fields/array.js in the getItemHtml() function. Label was actually an integer. Here is a patch that I created which fixes the problem:

    Code:
    --- array.js.orig    2017-06-06 18:48:25.257317470 +0200
    +++ array.js    2017-06-06 18:58:01.950878063 +0200
    @@ -288,6 +288,7 @@
                 var label = valueSanitized;
                 if (this.translatedOptions) {
                     label = ((value in this.translatedOptions) ? this.translatedOptions[value] : label);
    +                label = label.toString();
                     label = this.getHelper().stripTags(label);
                     label = label.replace(/"/g, '"');
                 }

  • #2
    Thanks

    Comment

    Working...
    X