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) »
  • Stuck 'loading' at Home Page for site CiviCRM
Pages: [1]

Author Topic: Stuck 'loading' at Home Page for site CiviCRM  (Read 5993 times)

1green1

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
    • Resource Center Chicago
Stuck 'loading' at Home Page for site CiviCRM
February 18, 2010, 06:57:18 am
Drupal 6.15; CiviCRM 3.1.2; Mac OSX 10.6.2; Safari 4.0.4

After installing 3.1.2, going to CiviCRM Home (civicrm/dashboard?reset=1) I'm presented with an offer to configure my dashboard and a notice that 'loading...' is ongoing (see attached). There's are spinning dots indicating an ongoing process, but it never stops. If I do click 'configure dashboard', I get the error below and a very odd screen (see also attached). Other potentially pertinent notes: I completely deleted a previous install of 3.0.4, deleted the CiviCRM associated database, and started from scratch (or so I think).
--------
Sorry. A non-recoverable error has occurred.
DB Error: constraint violation
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`resource_civicrm/civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452
Return to home page.
Error Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] =>
                    INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                    VALUES  ( 1, 102 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`resource_civicrm/civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] =>
                    INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                    VALUES  ( 1, 102 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`resource_civicrm/civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="
                    INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                    VALUES  ( 1, 102 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`resource_civicrm/civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)[/i][/i]
--------------

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Stuck 'loading' at Home Page for site CiviCRM
February 18, 2010, 07:02:18 am
I would suggest following.
1. Logout of Drupal
2. Login to Drupal and then go to CiviCRM dashboard.

This should fix your problem. This issue might be related to your session.

Hth

Kurund
« Last Edit: February 18, 2010, 09:12:20 pm by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

DaisyK

  • Guest
Re: Stuck 'loading' at Home Page for site CiviCRM
February 18, 2010, 02:26:30 pm
I have the exact same problem after upgrading to 3.1.2.

The dashboard works fine under IE (strange) but is stuck as above under FireFox.

The upgrade sequence all the way from 3.0.2 took forever - so if I have to reinstall CiviCRM and import my data, is the problem in the code base not the data?

1green1

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
    • Resource Center Chicago
Re: Stuck 'loading' at Home Page for site CiviCRM
February 18, 2010, 07:27:40 pm
When I reported this as a bug, Mr Lobo refused to consider it as such and directed me to the forum -- which contained NOTHING of relevance. Evidently this didn't affect previous versions of CiviCRM. If fixing this requires a complete reinstall, it is certainly quite bug-like. Mr Lobo claimed there must be "some old session data attached to your browser" but provide absolutely no additional guidance. I'm sure he's busy and is clear a best-loved maintainer, but that's cold to say the least. Most of us have no idea what "session data" is to begin with.

This is what I did. I tried the same procedure on another computer with the same version of Safari. No problem. It worked fine. Searched in a number of places and finally found how to "reset safari" (under the Safari menu -- see Reset Safari. There's probably something similar for IE.). This blows away a lot of stuff including everything you have in open Safari windows, so make sure you're ready.

But it worked.

Note, this also caused a similar problem with editing individual contacts...

In any case, this is not a simple issue of "some old session data attached to your browser" as if the truth of that assertion was enough. It needs some specific attention.

1green1

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
    • Resource Center Chicago
Re: Stuck 'loading' at Home Page for site CiviCRM
February 18, 2010, 07:34:59 pm
Just to clarify, the problem with individual contacts existed *before* the cleansing, not after...

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: Stuck 'loading' at Home Page for site CiviCRM
February 18, 2010, 09:14:43 pm

just to clarify:

1. i asked you to discuss the issue on the forum: http://issues.civicrm.org/jira/browse/CRM-5852

2. apologies for the brief message, we have no idea of the skills/level of the person filing an issue / posting on the forums. Feel free to ask for further clarification and someone is likely to help / point you to a doc page for more info

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

DaisyK

  • Guest
Re: Stuck 'loading' at Home Page for site CiviCRM
February 19, 2010, 08:17:59 am
Re the subject problem of the dashboard being 'stuck', after reinstalling several times, I had misread Kurund's simpler solution of logging out. I was logged in as User 1 after doing a Drupal DB upgrade when the problem first occurred.

Logging out did fix my problem with the dashboard being stuck but this reoccurs consistently when logged in as Drupal User 1. Dashboard works fine logged in as different Civicrm-permissioned user. The difference (no them) in IE was caused by hitting IE's CSS file limit. Dashboard 'stuck' problem reoccurs ( but without the full DB constraint error message) with User 1 on both FF & IE as reported by 1green1.

Sorry for the confusion - good advice given by Kurund.

amottta

  • Guest
Re: Stuck 'loading' at Home Page for site CiviCRM
March 15, 2010, 01:59:46 pm
I am having the same issue in multiple browsers. FF and Chrome.  I have not checked IE or Safari.  Has there been a resolution to this issue?  I have tried logging out, and clearing all browser data.

DLBaker

  • Guest
Re: Stuck 'loading' at Home Page for site CiviCRM [ Resolved - Resolution ]
April 15, 2010, 12:09:44 pm
Quote from: 1green1 on February 18, 2010, 07:27:40 pm
When I reported this as a bug, Mr Lobo refused to consider it as such and directed me to the forum -- which contained NOTHING of relevance. Evidently this didn't affect previous versions of CiviCRM. If fixing this requires a complete reinstall, it is certainly quite bug-like. Mr Lobo claimed there must be "some old session data attached to your browser" but provide absolutely no additional guidance. I'm sure he's busy and is clear a best-loved maintainer, but that's cold to say the least. Most of us have no idea what "session data" is to begin with.

This is what I did. I tried the same procedure on another computer with the same version of Safari. No problem. It worked fine. Searched in a number of places and finally found how to "reset safari" (under the Safari menu -- see Reset Safari. There's probably something similar for IE.). This blows away a lot of stuff including everything you have in open Safari windows, so make sure you're ready.

But it worked.

Note, this also caused a similar problem with editing individual contacts...

In any case, this is not a simple issue of "some old session data attached to your browser" as if the truth of that assertion was enough. It needs some specific attention.


I recall the upgrade howto instructing us to remove session information from the database prior to each upgrade iteration.

Did you do this?
<url>/civicrm/admin?sessionReset=2

Worked for me.



- Dan.
« Last Edit: April 15, 2010, 12:12:43 pm by DLBaker »

notemohc

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
Re: Stuck 'loading' at Home Page for site CiviCRM
April 21, 2010, 06:38:32 am
First sorry for my English.

I encountered the same problem, stuck on the loading page dashboard.

Actually came with an error that was not json_encode enabled on the server.

Maybe to see that side

sdstevep

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.36
  • PHP version: 5.3.0
Re: Stuck 'loading' at Home Page for site CiviCRM
January 16, 2011, 06:54:02 pm
I had the same problem - I had uninstalled CiviCRM and then reinstalled it and lots of stuff on the Configuration Checklist worked but that Dashboard page was stuck -- I think the problem probably was cached data on my browser.

I was using Firefox and couldn't get around the error -- errors such as
INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                    VALUES  ( 1, 102 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civigtt`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]

Saw one of these posts saying it worked in Internet Explorer so I quickly tried that and the page came up. So then I thought ok, now it's fixed and the database is happy, went back to Firefox and had the same error.

Read the post about clearing caches so in Firefox went to Tools/Clear Recent History and cleared caches and active logins - I can't recall for sure but I might have cleared just the first four items in that list that comes up - Browsing, Form, Cookies, Cache -- with no luck, and it might not have been until I added clearing active logins.

Anyway, problem fixed by first opening the page in ie, which I suspect is irrelevant, and then clearing caches etc in Firefox.

FYI I'm on Drupal 6.20 and CiviCRM 3.3.2, Win 7 Pro, Wamp. Oooh. Clever. I just noticed that the forum knows which versions of everything I'm on. 
« Last Edit: January 16, 2011, 07:03:15 pm by sdstevep »

gittosj

  • I’m new here
  • *
  • Posts: 1
  • Karma: 1
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.22
  • MySQL version: 5.091
  • PHP version: 5.2
Re: Stuck 'loading' at Home Page for site CiviCRM
January 31, 2012, 02:21:32 am
Just a quick update for anyone still struggling with this in 2012 (for googling purposes). I was still stuck with this and could not find a fix. It seems as thought the common theme is that your configuration / settings / urls are somehow wrong. In my case they had been fine but seem to have rotted or perhaps I upgraded and didn't notice the issue.

Anyway solution for me was to tweak civicrm.settings.php where mine was wrongly set to:

define( 'CIVICRM_UF_BASEURL'      , 'mysitenamedotcom/civicrm/' );

which I altered to:

define( 'CIVICRM_UF_BASEURL'      , mysitenamedotcom/' );

and everything is magically fine again. The explananation in the settings file is hopelessly confusing and - key point is that this is your sites base url. If this doesn't work for you then check similar settings / urls / directories since these seem to be the common cause of dashboard problems. If you find a different solution then help others - sign up and leave it below!

Best of luck...
« Last Edit: January 31, 2012, 02:23:06 am by gittosj »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Stuck 'loading' at Home Page for site CiviCRM

This forum was archived on 2017-11-26.