Announcement

Collapse
No announcement yet.

Records within an Opportunity are blank when using left menu and selecting from list

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

  • Records within an Opportunity are blank when using left menu and selecting from list

    I'm not sure when this started or what happened, but when I select a record from Opportunity using the menu on the left (the blue menu) and then pick one from the list that comes up, all the fields are blank. If you hit the browser refresh button the fields will populate. This does not happen when selecting the Opportunity from the Original Lead, or if you already have an Opportunity open and you click the Opportunity link from the top of the page and select an Opportunity from the list. Also once I make any edits to the opportunity, or attach a quote, the behavior stops happening (is normal) so it only seems to happen on brand new, un-edited Opportunities.

    I have turned debug logs on in Espo and get nothing but the BPM processing messages
    Code:
    [2018-10-31 19:44:01] Espo.DEBUG: BPM: processPendingFlows [] []
    Apache error logs just show normal server startups:
    Code:
    [Wed Oct 31 19:09:22.558027 2018] [ssl:warn] [pid 1147] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Oct 31 19:09:22.575670 2018] [ssl:warn] [pid 1147] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
    [Wed Oct 31 19:09:23.155009 2018] [ssl:warn] [pid 1148] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Oct 31 19:09:23.155185 2018] [ssl:warn] [pid 1148] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
    [Wed Oct 31 19:09:23.156484 2018] [mpm_prefork:notice] [pid 1148] AH00163: Apache/2.4.10 (Debian) OpenSSL/1.0.1t configured -- resuming normal operations
    [Wed Oct 31 19:09:23.156494 2018] [core:notice] [pid 1148] AH00094: Command line: '/usr/sbin/apache2'
    Apache Other VHOSTS access logs:
    Code:
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Activities/action/popupNotifications HTTP/1.1" 200 335 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d HTTP/1.1" 200 2206 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Activities/Opportunity/5bda057a885075d9d/activities?maxSize=5&offset=0&sortBy=dateStart&asc=false&where%5B%5D=false HTTP/1.1" 200 357 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/tasks?select=name%2CisOverdue%2CassignedUserId%2CassignedUserName%2Cstatus%2CdateEnd%2CdateEndDate&maxSize=5&offset=0&sortBy=createdAt&asc=false&where%5B0%5D%5Btype%5D=primary&where%5B0%5D%5Bvalue%5D=actual HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Activities/Opportunity/5bda057a885075d9d/history?maxSize=5&offset=0&sortBy=dateStart&asc=false&where%5B%5D=false HTTP/1.1" 200 357 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/quotes?primaryFilter=&select=name%2Cstatus%2CcreatedAt%2CamountCurrency%2Camount&maxSize=5&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/documents?primaryFilter=&select=name%2CfileId%2CfileName%2CfolderId%2CfolderName%2CcreatedAt&maxSize=5&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/stream?filter=&maxSize=5&offset=0&sortBy=number&asc=false HTTP/1.1" 200 935 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:22 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/payments?primaryFilter=&select=accountId%2CaccountName%2Cname%2CamountCurrency%2Camount%2CpaymentType%2Cstatus%2CdueDate&maxSize=5&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:24 +0000] "GET /api/v1/Opportunity?select=name%2CaccountId%2CaccountName%2CopportunityType%2CcreatedAt&maxSize=20&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 938 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:24 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d HTTP/1.1" 200 2206 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Activities/Opportunity/5bda057a885075d9d/activities?maxSize=5&offset=0&sortBy=dateStart&asc=false&where%5B%5D=false HTTP/1.1" 200 357 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/tasks?select=name%2CisOverdue%2CassignedUserId%2CassignedUserName%2Cstatus%2CdateEnd%2CdateEndDate&maxSize=5&offset=0&sortBy=createdAt&asc=false&where%5B0%5D%5Btype%5D=primary&where%5B0%5D%5Bvalue%5D=actual HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Activities/Opportunity/5bda057a885075d9d/history?maxSize=5&offset=0&sortBy=dateStart&asc=false&where%5B%5D=false HTTP/1.1" 200 357 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/documents?primaryFilter=&select=name%2CfileId%2CfileName%2CfolderId%2CfolderName%2CcreatedAt&maxSize=5&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/stream?filter=&maxSize=5&offset=0&sortBy=number&asc=false HTTP/1.1" 200 935 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/quotes?primaryFilter=&select=name%2Cstatus%2CcreatedAt%2CamountCurrency%2Camount&maxSize=5&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    localhost:80 172.21.16.132 - admin [31/Oct/2018:19:42:25 +0000] "GET /api/v1/Opportunity/5bda057a885075d9d/payments?primaryFilter=&select=accountId%2CaccountName%2Cname%2CamountCurrency%2Camount%2CpaymentType%2Cstatus%2CdueDate&maxSize=5&offset=0&sortBy=createdAt&asc=false HTTP/1.1" 200 355 "http://crm2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
    Nothing in the system logs pertinent to this error.

    I have attached two screen shots of selecting the new Opportunity from the left menu, and then after pressing the browser refresh button.


    Click image for larger version

Name:	blank_opportunity.jpg
Views:	595
Size:	69.8 KB
ID:	43184 Click image for larger version

Name:	reloaded_opportunity.jpg
Views:	399
Size:	68.8 KB
ID:	43185

  • #2
    When a record is opened from the list, it's displayed with the data available at that moment, then more data is fetched from the backend and rendered. Due some reason additional data is not rendered or not fetched.

    There might be errors logged in browser console.

    Comment


    • #3
      Yes you were right there is a console error, this is the error:
      Code:
      VM5086:117 Uncaught TypeError: Cannot read property 'preventLoop' of null
          at child.eval (eval at _execute (espo.min.js?r=1540938408:17), <anonymous>:117:27)
          at triggerEvents (espo.min.js?r=1540938408:5)
          at triggerApi (espo.min.js?r=1540938408:5)
          at eventsApi (espo.min.js?r=1540938408:5)
          at child.Events.trigger (espo.min.js?r=1540938408:5)
          at child.set (espo.min.js?r=1540938408:5)
          at child.set (espo.min.js?r=1540938408:17)
          at child.eval (eval at _execute (espo.min.js?r=1540938408:17), <anonymous>:113:40)
          at triggerEvents (espo.min.js?r=1540938408:5)
          at triggerApi (espo.min.js?r=1540938408:5)

      Comment


      • #4
        Looks like that you have code not existing in EspoCRM codebase. Maybe a virus or some extension that modifies js files. Not sure.

        Comment


        • #5
          Would be helpful to see the code where the error occurs. Where 'preventLoop' property is tried to be read.

          Comment


          • #6
            I'm not sure exactly what you're asking for, and you'll have to excuse me I am terrible at troubleshooting JavaScript. I am much more comfortable with PHP. This is the code snippet that is failing:
            Code:
            this.listenTo(this.currencyModel, 'change:currency', function (model, o) {
                                if (o.preventLoop) return;
                                this.model.set('amountCurrency', model.get('currency'), {ui: true});
                            }, this);
            Which is in client/modules/advanced/src/views/opportunity/fields/item-list.js at line 116
            and a part of:
            Espo.require(calculationHandlerClassName, function (CalculationHandler) {
            It seems o is NULL so that the property preventLoop doesn't exist.

            I have not modified any of the code, especially the js portion. The only modifications I make are to the custom entityDefs, and I think maybe clientDefs.

            Let me know if you need anything else. Thanks.

            Comment


            • #7
              You can modify that line:

              if (o && o.preventLoop) return;

              And then clear cache in Administration.

              I will take a look and fix. Thanks.

              Comment


              • #8
                One more possible solution:

                Add Amount field to the list layout for opportunity.

                Comment


                • #9
                  After modifying to
                  Code:
                  if (o && o.preventLoop) return;
                  I can no longer get this error to happen.

                  Thank you for all your help!!

                  Comment

                  Working...
                  X