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 CiviReport (Moderator: Dave Greenberg) »
  • How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
Pages: [1]

Author Topic: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.  (Read 1752 times)

ericaack

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
October 23, 2012, 02:46:54 pm
I upgraded a site from Drupal 6 civicrm 3.3 to Drupal 7 CiviCRM 4.2.2 on one server, then uploaded the resulting database to a new production server. The data all seems to have come over fine, but my dashlets are showing up as complete blocks of HTML (complete with <html></html>) that say "Found. The document has moved here." The word "here" is a link to a URL that, when cleaned up a little, actually does display the report that the dashlet is supposed to be displaying. I found the HTML code displaying in place of the dashlet in the table civicrm_dashboard_contact, in the "content" field. I found the corresponding entries in the civicrm_dashboard_contact table on my localhost (from the original database that got copied up to the production server) and it had an HTML snippet beginning with a <span> and ending with some javascript. That HTML was using a local path, so I cleaned up the path and copied the HTML into the corresponding table and field on my production server, and voila, the dashlet started working. But when another user user logged in and tried to view his dashboard, all the dashlets said "Found. The document has moved here" and there were new entries in the production civicrm_dashboard_contact table for for each of that user's dashlets where the "content" field contains the HTML block (<html>...</html>).

I looked through the code to try to figure out what the use of the civicrm_dashboard_contact table is, and how it gets populated, but didn't find anything very enlightening. It seems that the code in the working "content" fields comes from the template file /civicrm/templates/CRM/Activity/Selector/Selector.tpl, pulling in the data from somewhere I couldn't easily figure out. Should the content of the "content" field actually be a snippet of HTML and JavaScript? Is the civicrm_dashboard_contact table just a kind of cache for dashlets? What could be producing the results that I'm seeing?

Thanks for any help.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
October 23, 2012, 03:11:40 pm


yes that is a cache so we dont have to load the server everytime the user goes to the dashboard

can u hit "refresh dashboard data", that should refresh your database cache

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ericaack

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
Re: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
October 25, 2012, 11:33:19 am
Sadly, clicking "Refresh Dashboard Data" simply reverted everything to the "Found. The document has moved here." I'm thinking there must be an old path that is getting picked up by whatever process populates the civicrm_dashboard_contact table. I grepped for the old path in an export of the database, but didn't turn anything up.

ericaack

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
Re: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
October 25, 2012, 12:31:41 pm
There is one other clue to what might be going on. This site is at the University of Michigan, and we use Cosign for single sign-on. My Drupal installation uses the Cosign TS module to handle that. (Note, I'm NOT expecting anyone to figure out Cosign here, just to think about this info as a symptom.) The link that the word "here" in "The document has moved here" points to is:

https://weblogin.umich.edu/?cosign-ginsberg&https://ginsberg.umich.edu/civicrm/civicrm/dashlet/activity?reset=1&snippet=5

If you strip off the cosign part at the front, this link actually does display the requested report.  I suspect that the the path is getting rewritten to go to Cosign because the full URL is being used instead of a relative path, and I'm wondering why the full URL is being used. It would be helpful to get a pointer to where in the code this path is being generated. Does anyone know?

Thanks.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
October 25, 2012, 02:00:22 pm
Just checked my install and all dashlet urls are relative in the DB (civicrm_dashboard.url). if you want to investigate the code - most (all?) of it is in CRM/Core/BAO/Dashboard.php
Protect your investment in CiviCRM by  becoming a Member!

ericaack

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
Re: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
November 13, 2012, 07:54:13 am
After some further investigation, it appears that what triggers the redirect to the Cosign sign-in portal is any URL using http rather than https. What isn't clear to me is where the bad URL is coming from. Is there a way to see what is getting sent to the template file that is supposed to be creating the HTML for the dashlet (/civicrm/templates/CRM/Activity/Selector/Selector.tpl)?

Anyone have any ideas? I'm dead in the water.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: How civicrm_dashboard_content "content" field gets populated? Dashlet problem.
November 14, 2012, 06:39:44 am
Looks like this problem was caused by a typo in a file:
http://issues.civicrm.org/jira/browse/CRM-11272
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • How civicrm_dashboard_content "content" field gets populated? Dashlet problem.

This forum was archived on 2017-11-26.