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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Dashboard problem after upgrade
Pages: [1]

Author Topic: Dashboard problem after upgrade  (Read 1064 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Dashboard problem after upgrade
February 11, 2011, 02:40:17 pm
After an upgrade (and this happened on 3.3.3 to 3.3.5) one or more Dashlets will fail, logging the following error

Quote
Feb 12 08:09:03  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

        [ code ] => -5
       
[message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_cache (group_name , path , data , created_date ) VALUES ( ... )  [nativecode=1062 ** Duplicate entry 'navigation-navigationList ' for key 'UI_group_path']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_cache (group_name , path , data , created_date ) VALUES ( ... )  [nativecode=1062 ** Duplicate entry 'navigation-navigationList ' for key 'UI_group_path']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_cache (group_name , path , data , created_date ) VALUES ( ... )  [nativecode=1062 ** Duplicate entry 'navigation-navigationList ' for key 'UI_group_path']"]
)


Feb 12 08:09:03  [info] $backTrace = //civicrm/CRM/Core/Error.php, backtrace, 205
, handle,
//civicrm/packages/PEAR.php, call_user_func, 931
//civicrm/packages/DB.php, PEAR_Error, 968
//civicrm/packages/PEAR.php, DB_Error, 564
//civicrm/packages/DB/common.php, raiseError, 1903
//civicrm/packages/DB/mysql.php, raiseError, 898
//civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
//civicrm/packages/DB/common.php, simpleQuery, 1216
//civicrm/packages/DB/DataObject.php, query, 2421
//civicrm/packages/DB/DataObject.php, _query, 1053
//civicrm/CRM/Core/DAO.php, insert, 281
//civicrm/CRM/Core/BAO/Cache.php, save, 73
//civicrm/CRM/Core/BAO/Navigation.php, setItem, 224
//civicrm/CRM/Report/Form/Instance.php, getNavigationList, 92
//civicrm/CRM/Report/Form.php, buildForm, 674
//civicrm/CRM/Report/Form.php, buildInstanceAndButtons, 727
//civicrm/CRM/Core/Form.php, buildQuickForm, 326
//civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 99
//civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
//civicrm/packages/HTML/QuickForm/Page.php, handle, 103
//civicrm/CRM/Core/Controller.php, handle, 284
//civicrm/CRM/Utils/Wrapper.php, run, 115
//civicrm/CRM/Report/Page/Instance.php, run, 108
//civicrm/CRM/Core/Invoke.php, run, 219
//civicrm/drupal/civicrm.module, invoke, 355
, civicrm_invoke,
//includes/menu.inc, call_user_func_array, 348
//index.php, menu_execute_active_handler, 18

I'm able to resolve the issue by pressing the "Refresh Dashboard Data" button.

Is it possible to amend the upgrade code to refresh the dashboard data?
Alternately, can the Report code be modified so that if it gets a duplicate for 'navigation-navigationList' in the cache, that it "refreshes the dashboard data" and tries once more?

Ken

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Dashboard problem after upgrade
May 21, 2011, 10:36:06 pm
we've run into this as well, but not always when upgrading -- it shows up at other random times.
but i think i found the issue --

in CRM/Core/BAO/Navigation.php, around line 192, $cacheKeyString is set to "navigationList "
that's used in the getItem method. note the extra space at the end of the string.
the get/set both use the same string, and it looks like its being stored with the extra space. but i think it might be throwing the getItem off so that in Navigation.php it doesn't find the existing cache value the way it should, and thus tries to reset it, breaking on the unique key constraint.

the error has been difficult to reproduce consistently. but i'm going to remove the extra space and see if the issue reappears. i reviewed other similarly structured cache records and can't see why there would be a need for the space. so i think it's just a typo.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Dashboard problem after upgrade

This forum was archived on 2017-11-26.