AnsweredAssumed Answered

iFrame Dashlet in SugarCRM7

Question asked by Francesca Shiekh on Jul 15, 2014
Latest reply on Oct 28, 2014 by Francesca Shiekh
I added an iFrame dashlet in SugarCRM 7 and I'm getting an error:

[blocked] The page at 'https://<our server>/sugarcrm/index.php?module=Home&action=index#Accounts/effe9ce7-7104-8f7b-660d-5395edb92502' was loaded over HTTPS, but ran insecure content from 'http://undefined/?db=TST&license_number=123456789': this content should also be loaded over HTTPS.

There are two problems here:
1) how do I get around the insecure content? And why is it insecure given that the other server is also only serving https pages.
2) why does it say it ran insecure content from http://undefined? when the url is well defined?

This is the code in  mysugar/custom/clients/base/views/dashlet-licenses

               

dashlet-licenses.php

               
$viewdefs['base']['view']['dashlet-licenses'] = array(
        'dashlets' => array(
                array(
                        'label' => 'LBL_DASHLET_LICENSES_BOX_DESCRIPTION',
                        'description' => 'License Information',
                        'config' => array(
                           'url' => 'https://<our internal server url/ourscript.cgi>',
                        ),
                        'preview' => array(),
                        'filter' => array(
                           'module' => array(
                              'Accounts',
                              'Contacts',
                              'Leads',
                              'Cases',
                           ),
                           'view' => 'record',
                        ),
                ),
        ),
        'view_panel' => array(
                array(
                   'type' => 'iframe',
                   'name' => 'url',
                   'label' => 'LBL_DASHLET_LICENSES_BOX_URL',
                ),
        ),
);
                                                     
               

dashlet-licenses.js


({
   plugins: ['Dashlet'],
   _render: function(){
      if(!this.meta.config) {
         this.dashletConfig.view_panel[0].height = '420px';
      }
      var baseUrl = this.settings.get("baseurl"),
      searchFor = '?db=TST&license_number=' + this.model.get('license_number_temp_c');
      this.settings.set("url", baseUrl + searchFor);
      app.view.View.prototype._render.call(this);
   },
   initDashlet: function(view) {
      this.viewName = view;
      //refresh when search parameters are changed
      this.model.on('change:license_number_temp_c', this.render, this);
   },
})
                                                 
               

dashlet-licenses.hbs


               
{{#each this.dashletConfig.view_panel}}
  {{field ../this model=../this.settings}}
{{/each}}

Outcomes