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) »
  • Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
Pages: [1]

Author Topic: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7  (Read 1571 times)

barbarae

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 08, 2011, 05:11:34 pm
Tried all three upgrades with same result. Beginning to wonder if I have to rebuild my whole site - and that would not make me very confident to support potential clients.

Also I see pledge reporting has changed from one Pledge Summary (that used a Pledge Detail Report template) to 2 reports with separate templates for a Summary and a Detail Report.. Upgrades go fine until trying to rebuild the Dashboard.

Is there an update I can run to split the Pledge reports first - my 4.0.4 version (that displays report and Dashboard Donation Summaries perfectly), has only the Donor Pledge Summary Report, but the upgrades all expect to support both reports with their separate templates.

This time my backtrace includes civiCRM debug information that I HOPE helps identify what I might try to fix this problem. I can attach files with my civiCRM_Dashboard and civiCRM_Dashboard_Contact table entries if that would help. It appears there is a problem retrieving receipt recoreds, even though they exist ???

C:\wamp\www\sites\all\modules\civicrm\CRM\Core\Error.php, backtrace, 159
, handle,
C:\wamp\www\sites\all\modules\civicrm\packages\PEAR.php, call_user_func, 931
C:\wamp\www\sites\all\modules\civicrm\packages\DB.php, PEAR_Error, 968
C:\wamp\www\sites\all\modules\civicrm\packages\PEAR.php, DB_Error, 564
C:\wamp\www\sites\all\modules\civicrm\packages\DB\common.php, raiseError, 1903
C:\wamp\www\sites\all\modules\civicrm\packages\DB\mysql.php, raiseError, 898
C:\wamp\www\sites\all\modules\civicrm\packages\DB\mysql.php, mysqlRaiseError, 327
C:\wamp\www\sites\all\modules\civicrm\packages\DB\common.php, simpleQuery, 1216
C:\wamp\www\sites\all\modules\civicrm\CRM\Utils\File.php, query, 260
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Form.php, sourceSQLFile, 154
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Form.php, source, 286
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Form.php, processLocales, 302
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Incremental\php\ThreeFour.php, processSQL, 235
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Page\Upgrade.php, upgrade_3_4_5, 250
C:\wamp\www\sites\all\modules\civicrm\CRM\Core\Invoke.php, run, 224
C:\wamp\www\sites\all\modules\civicrm\drupal\civicrm.module, invoke, 447
, civicrm_invoke,
C:\wamp\www\includes\menu.inc, call_user_func_array, 503
C:\wamp\www\index.php, menu_execute_active_handler, 21
Sorry. A non-recoverable error has occurred.
DB Error: syntax error
Error Details
Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT @content := msg_html FROM civicrm_msg_template WHERE workflow_id = @workf' at line 2, 1064
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = 'contribution_online_receipt';
  SELECT @content := msg_html FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
  UPDATE civicrm_msg_template SET msg_html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title></title>
</head>
<body>

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: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 08, 2011, 05:43:34 pm

thanx for your persistence in following the issue :)

can you share the DB? if so, can you please email it to me: lobo at yahoo dot com

thanx

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

barbarae

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 13, 2011, 09:58:47 am
Lobo - sorry I missed notification on your reply to my post until this morning (I've actually been immersed in trying to debug while on vacation in Florida). Thank you for being willing to have a look !!!!

So far I've tried to eliminate any potential problems with the Dashboard rebuild and hence have set up Case Management in case that was the problem - a bit challenging with its own separate configuration files, and the 4.0.4 bug in the AccessMultipleCase checking that I've patched to allow "Open Case" to work. So I now have 2 Cases open (woo hoo) even though that wasn't my original focus.

I still abended this morning yet again (I've sent you my civiCRMDB backup/restore file, and my zipped MySQL bin DB records). Let me know if you need the whole MySQL set of data bases - Drupal 7.9, etc. and I will send those too.

Here's my abend backtrace:

backTrace

C:\wamp\www\sites\all\modules\civicrm\CRM\Core\Error.php, backtrace, 159
, handle,
C:\wamp\www\sites\all\modules\civicrm\packages\PEAR.php, call_user_func, 931
C:\wamp\www\sites\all\modules\civicrm\packages\DB.php, PEAR_Error, 968
C:\wamp\www\sites\all\modules\civicrm\packages\PEAR.php, DB_Error, 564
C:\wamp\www\sites\all\modules\civicrm\packages\DB\common.php, raiseError, 1903
C:\wamp\www\sites\all\modules\civicrm\packages\DB\mysql.php, raiseError, 898
C:\wamp\www\sites\all\modules\civicrm\packages\DB\mysql.php, mysqlRaiseError, 327
C:\wamp\www\sites\all\modules\civicrm\packages\DB\common.php, simpleQuery, 1216
C:\wamp\www\sites\all\modules\civicrm\CRM\Utils\File.php, query, 260
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Form.php, sourceSQLFile, 154
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Form.php, source, 286
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Form.php, processLocales, 302
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Incremental\php\ThreeFour.php, processSQL, 235
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Page\Upgrade.php, upgrade_3_4_5, 250
C:\wamp\www\sites\all\modules\civicrm\CRM\Core\Invoke.php, run, 224
C:\wamp\www\sites\all\modules\civicrm\drupal\civicrm.module, invoke, 447
, civicrm_invoke,
C:\wamp\www\includes\menu.inc, call_user_func_array, 503
C:\wamp\www\index.php, menu_execute_active_handler, 21
Sorry. A non-recoverable error has occurred.

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 14, 2011, 03:57:03 am
Errickson,

I checked your database and tried upgrading. And it upgraded (on d7) to v4.0.7 without any errors / problems including menu rebuild. (I have mailed you the upgraded db.)

I think something is wrong with your upgrade setup / flow - either codebase is not right or codebase in pointing to wrong db. Your backtrace mentions this file -
Code: [Select]
C:\wamp\www\sites\all\modules\civicrm\CRM\Upgrade\Incremental\php\ThreeFour.phpWhich shouldn't have been called for a v4.0.4 -> v4.0.7 upgrade.

Make sure you following steps correctly - http://wiki.civicrm.org/confluence/display/CRMDOC40/Upgrade+Drupal+Sites+to+4.0.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

barbarae

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 14, 2011, 08:31:13 pm
Thanks for the help so far. I had figured out and loaded the sql you sent successfully into a civiCRM database with PHPMyAdmin, but that would leave me out of synch with my civiCRM code base (in modules/civiCRM).  Is there some other way to update the code base to match the upgraded DB?

I found two references to latest civiCRM version as 4.0.7 (which is wrong since I am really still at 4.0.4).

***  It seems that any upgrade failure still leaves civiCRM's recorded version in its upload folder as the failed version.   And I'm not sure what else is out of synch at this point that was left over after attempted upgrades (over 4.0.5, 4.0.6 and 4.0.7).  Is there a way to "clean" my civiCRM files to get them consistent? ***

I got further in the upgrade process when the default current version in the latest_version_cache.txt was 4.0.7 than I did when I corrected the version to 4.0.7.  BTW - when the upgrade screen actually displayed (with the incorrect civiCRM 4.0.7 in civi's latest_version_cache_txt) it showed that I was about to upgrade from 4.0.4 to 4.0.7 ?

I tried updating the latest version in the civiCRM default/files/civiCRM/upload folder, and then following the standard steps, but then I got the following error:

( ! ) Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'civicrm_invoke' not found or invalid function name in C:\wamp\www\includes\menu.inc on line 503
Call Stack
#   Time   Memory   Function   Location
1   0.0597   674080   {main}( )   ..\index.php:0
2   1.3254   6118144   menu_execute_active_handler( )   ..\index.php:21
3   1.3257   6119072   call_user_func_array ( )   ..\menu.inc:503

Not sure what to try next ? As I mentioned before, my current 4.0.4 code base works fine if I just never upgrade. But I definitely want to get it fixed so I can continue getting enhancements and be able to show non-profits we work with with be able to count on civiCRM.

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 14, 2011, 10:40:13 pm
Quote
Thanks for the help so far. I had figured out and loaded the sql you sent successfully into a civiCRM database with PHPMyAdmin, but that would leave me out of synch with my civiCRM code base (in modules/civiCRM).  Is there some other way to update the code base to match the upgraded DB?

Upto the point of hitting upgrade url all the steps are same as documented. And by that point you already have latest code version.
In this case where you already have a upgraded database, instead of hitting upgrade you just replace the database with the upgraded one, which would make your codebase sync with database version.

In case of upgrade failures, you 'll have to replace database back with the backup and retry the upgrade.
In case you would like to restore to previous working setup, you will have to restore code-base as well in addition to your database.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

barbarae

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 16, 2011, 11:11:28 am
Thanks for your continued support !

I think I'm getting close, but not quite in business with 4.0.7.

I cleared cache, copied in the 4.0.7 code base, used phpMyAdmin to drop and re-add the civiCRM DB you kindly sent me.
Exited WAMP and reopened 3 times to be sure all came up ok.

Then tried to clear cache again and got the following error:


( ! ) Notice: Undefined variable: data in C:\wamp\www\sites\all\modules\civicrm\drupal\modules\views\civicrm.views.inc on line 6917
Call Stack
#   Time   Memory   Function   Location
1   0.0154   674200   {main}( )   ..\index.php:0
2   1.5538   6002744   menu_execute_active_handler( )   ..\index.php:21
3   1.5676   6005352   call_user_func_array ( )   ..\menu.inc:503
4   1.5676   6005592   admin_menu_flush_cache( )   ..\menu.inc:0
5   1.5806   6079400   system_clear_cache_submit( )   ..\admin_menu.inc:800
6   1.5806   6079400   drupal_flush_all_caches( )   ..\system.admin.inc:1726
7   1.6603   6079400   registry_rebuild( )   ..\common.inc:7145
8   1.6603   6079400   system_rebuild_module_data( )   ..\bootstrap.inc:3014
9   1.6604   6079720   _system_rebuild_module_data( )   ..\system.module:2422
10   12.9771   6420216   drupal_alter( )   ..\system.module:2394
11   12.9771   6420344   field_system_info_alter( )   ..\module.inc:1003
12   12.9947   6540384   l( )   ..\field.module:408
13   12.9947   6541032   theme_get_registry( )   ..\common.inc:2341
14   12.9948   6541080   call_user_func_array ( )   ..\theme.inc:248
15   12.9948   6541568   _theme_load_registry( )   ..\theme.inc:0
16   12.9959   6541616   _theme_build_registry( )   ..\theme.inc:289
17   18.3950   10042784   _theme_process_registry( )   ..\theme.inc:536
18   18.3951   10098472   views_theme( )   ..\theme.inc:384
19   18.3957   10105176   views_fetch_plugin_data( )   ..\views.module:90
20   18.4024   10107368   _views_fetch_plugin_data( )   ..\views.module:1156
21   18.6103   10486648   views_discover_plugins( )   ..\cache.inc:75
22   18.6142   10500056   civicrm_views_plugins( )   ..\plugins.inc:388


My next challenge is locating the plugins it can't find - and wondering why that's happening. 

I have been unavailable for a while because I flew to Hawaii overnight, so testing in between tours to Diamond Head etc.

Any clues to save me a bit more of research ?

barbarae

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 17, 2011, 10:04:59 pm
Finally - I traced through the backtraced code list and uncovered what looks like a mis-placed "return" statement in civicrm.views.inc. It looks to me like the function call at line 6895 returns with empty data when the Drupal 'calendar' module does not exist. Since I had not installed that module, the function call returned empty and caused my database error.  I've now installed two Drupal modules that were needed by 4.0.7 civicrm:' fullcalendar' and 'civicrm_event'. 

Am I right about the function call ?  And what data should be returned if the calendar module is missing?

I am up and running !!!!!!!!!!!   Woo Hoo - thanks for your help ;)

civicrm.views.inc at line 6895 below:

function civicrm_views_plugins() {
  if (module_exists('calendar')) {
    $civicrm_module_path = drupal_get_path('module', 'civicrm');
 
    $data = array(
      'module' => 'civicrm', // This just tells our themes are elsewhere.
 
      'row' => array(
        'civicrm_event_calendar' => array(
          'title' => t('Calendar Items'),
          'help' => t('Displays each selected node as a Calendar item.'),
          'handler' => 'calendar_plugin_row_civicrm_event',
          'path' => "$civicrm_module_path/modules/views/plugins",
          'base' => array('civicrm_event'),
          'uses options' => TRUE,
          'uses fields' => TRUE,
          'type' => 'normal',
        ),
      ),
    );
   
  }
  return $data;

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7
November 17, 2011, 11:31:02 pm
Congrats on the progress.

Try adding '$data=array();" above if condition and check. So the function would look like:
Quote
function civicrm_views_plugins() {
  $data = array();
  if (module_exists('calendar')) {
  ....

This fix is already present in svn.

Also try switching off the notices. Not sure how you do this on a wamp setup.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Abending on dashboard rebuild when upgrading from 4.0.4 to 4.0.7

This forum was archived on 2017-11-26.