CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Activity Dashlet shows "false"
Pages: 1 [2]

Author Topic: Activity Dashlet shows "false"  (Read 8899 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity Dashlet shows "false"
November 25, 2013, 01:34:19 pm
The above 'seemed' to fix the issue - but it came back. In this case the site has more than one url & maybe that played into the mix.

Anyway here is what I found

1) From the server pinging the url gave me a different domain that pinging it from my PC (albeit still one on the same server).
2) I discovered that in this case the DNS used by the server was not the same server that held the public DNS records
3) It turned out that the server had a DNS zone configurable via cpanel. Although this did not affect the public DNS records it did affect the DNS information returned to the server. I added DNS records in here & it fixed the problem.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

bighudsonnut

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 2
    • Hudson Essex Terraplane Club site
  • CiviCRM version: 4.6.3
  • CMS version: Joomla 3.4.1
  • MySQL version: 5.5.42
  • PHP version: 5.5.23
Re: Activity Dashlet shows "false"
February 26, 2015, 02:08:53 pm
I posted this in another thread but I think this is related to the same problem this thread is addressing and nothing other than the workaround below has allowed me to see dashlets albeit in a text format.  Sitelock took a look that this to work around the issue with calling the URL.  I am still seeking some understanding of why the ajax call times out.  I am wondering if there is a mod_security setting that is preventing this. This is all way above my head. 

Current 4.5.6 code from CRM\Core\BAO\Dashboard.php
 // CRM-7087
      // -lets use relative url for internal use.
      // -make sure relative url should not be htmlize.
      if (substr($dashboadDAO->url, 0, 4) != 'http') {
        $urlParam = explode('?', $dashboadDAO->url);
        $url = CRM_Utils_System::url($urlParam[0], $urlParam[1], TRUE, NULL, FALSE);
      }

      //get content from url
      $dao->content = CRM_Utils_System::getServerResponse($url);
      $dao->created_date = date("YmdHis");
      $dao->save();
    }

    $dashletInfo = array(
      'title' => $dashboadDAO->label,
      'name' => $dashboadDAO->name,
      'content' => $dao->content,
    );

Sitelock Fix  on my site in CRM\Core\BAO\Dashboard.php
// CRM-7087
      // -lets use relative url for internal use.
      // -make sure relative url should not be htmlize.
      if (substr($dashboadDAO->url, 0, 4) != 'http') {
        $urlParam = explode('?', $dashboadDAO->url);
      $url = CRM_Utils_System::url($urlParam[0], $urlParam[1], TRUE, NULL, FALSE);
      }
     
      //www.mysite.org/administrator/?option=com_civicrm&task=civicrm/report/instance/62&reset=1%C2%A7ion=2&snippet=5&context=dashlet

     $url=str_replace("%C2%A7", "", $url);
    
    
      //get content from url
      //sitelock fix
      include_once $_SERVER['DOCUMENT_ROOT'] . '/sitelock/functions.php';
      //$dao->content = CRM_Utils_System::getServerResponse($url);
      $dao->content = getBodyResponse($url);
      $dao->created_date = date("YmdHis");
      $dao->save();
    }

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Activity Dashlet shows "false"

This forum was archived on 2017-11-26.