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) »
  • Upgrade from 3.4.5 to 4.1.1 failed - $onbehalfProfileId missing (is it needed?)
Pages: [1]

Author Topic: Upgrade from 3.4.5 to 4.1.1 failed - $onbehalfProfileId missing (is it needed?)  (Read 842 times)

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Upgrade from 3.4.5 to 4.1.1 failed - $onbehalfProfileId missing (is it needed?)
June 26, 2012, 05:19:05 pm
I am trying to upgrade an existing civicrm database from 3.4.5 to 4.1.1.   I only get as far as pushing the upgrade button, followed by a few seconds and then the error message.   

I have tried the steps detailed in another post to disable CiviCRM module in Drupal, remove the civicrm.settings.php file, install civirm, remove the database, restore the original database and try again.  No luck.

Any suggestions are welcome.  The backtrace is attached.
« Last Edit: June 28, 2012, 10:25:37 am by mcgeehon »

jmickela

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 26, 2012, 07:34:32 pm
Odd, I'm having the exact same problem on my server...

Especially odd since I'm doing this upgrade a second time, the only difference being a newer data set, and it went fine the first time, and is totally bombing now. I'm starting to think there's something wrong with the data itself.

Are there any tables that, if not deleted/removed, will cause the installer to error out? Like, temporary import tables?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 06:19:00 am
mcgeehon,

I see this:

Code: [Select]
Jun 26 17:05:26  [info] Ignoring exception thrown by nullHandler: -18, DB Error: no such table
in your backtrace. Not sure what table it is, however. May be coming from the retrieveDirectoryAndURLPreferences function, but I'm not sure.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 07:55:28 am
Thanks.   Is there a way to trace CiviCRM in a way to identify which DB/table/function it is having the issue with?   Or turn on CiviCRM backtrace in a way that it identifies the table in question?

My initial thought was that the DB schema was modified in someway by my predecessor, and that this might be causing the problem, though I am not sure.

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: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 08:57:45 am

check the CiviCRM.MD5 HASH.log file in: files/civicrm/ConfigAndLog directory

should have the offending query

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

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 11:31:24 am
Lobo,

That is the file that I took the backtrace from.  Unfortunately, there isn't much else in that file other than what I originally attached. 

Basically, all I see is something like:

Code: [Select]
Jun 26 16:09:04  [info] $IDS Detector Details = Array
(
    [0] => Array
        (
            [name] => __utmv
            [value] => 172193003.anonymous user|1=User roles=anonymous user=1
            [page] => /civicrm/upgrade?reset=1
            [userid] =>
            [session] => QQho6UUTo6GaKKY9xyEW6Kkn3IHfUnR81GmbEew_p2w
            [ip] => xxxxxx
            [reaction] => 0
            [impact] => 25
        )

    [1] => Array
        (
            [name] => __unam
            [value] => 77e0968-1382ae18832-163d020e-1
            [page] => /civicrm/upgrade?reset=1
            [userid] =>
            [session] => QQho6UUTo6GaKKY9xyEW6Kkn3IHfUnR81GmbEew_p2w
            [ip] => xxxxxxx
            [reaction] => 0
            [impact] => 25
        )
    [2] => Array
        (
            [name] => IDS_user_agent
            [value] => Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
            [page] => /civicrm/upgrade?reset=1
            [userid] =>
            [session] => QQho6UUTo6GaKKY9xyEW6Kkn3IHfUnR81GmbEew_p2w
            [ip] => xxxxxx
            [reaction] => 0
            [impact] => 25
        )

)


Jun 26 16:09:14  [info] $IDS Detector Details = Array
(
    [0] => Array
        (
            [name] => __utmv
            [value] => 172193003.anonymous user|1=User roles=anonymous user=1
            [page] => /civicrm/upgrade?reset=1
            [userid] =>
            [session] => QQho6UUTo6GaKKY9xyEW6Kkn3IHfUnR81GmbEew_p2w
            [ip] => xxxxxx
            [reaction] => 0
            [impact] => 25
        )

    [1] => Array
        (
            [name] => __unam
            [value] => 77e0968-1382ae18832-163d020e-1
            [page] => /civicrm/upgrade?reset=1
            [userid] =>
            [session] => QQho6UUTo6GaKKY9xyEW6Kkn3IHfUnR81GmbEew_p2w
            [ip] => xxxxxxx
            [reaction] => 0
            [impact] => 25
        )

    [2] => Array
        (
            [name] => IDS_user_agent
            [value] => Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
            [page] => /civicrm/upgrade?reset=1
            [userid] =>
            [session] => QQho6UUTo6GaKKY9xyEW6Kkn3IHfUnR81GmbEew_p2w
            [ip] => xxxxxx
            [reaction] => 0
            [impact] => 25
        )

)


Jun 26 16:09:16  [info] $Fatal Error Details = Array
(
    [message] => We experienced an unexpected error. Please post a detailed description and the backtrace on the CiviCRM forums: http://forum.civicrm.org/
    [code] =>
)
Jun 26 16:09:16  [info] $backTrace = /var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 303
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/ThreeFour.php, fatal, 316
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php, upgrade_3_4_7, 265
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 227
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 454
, civicrm_invoke,
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/includes/menu.inc, call_user_func_array, 516
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/index.php, menu_execute_active_handler, 26

Jun 26 16:09:16  [info] Ignoring exception thrown by nullHandler: -18, DB Error: no such table

Jun 26 16:09:16  [info] $backTrace = /var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 547
, nullHandler,
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 968
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1908
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1221
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2428
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1614
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 166
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 903
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php, executeQuery, 457
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/BAO/ConfigSetting.php, retrieveDirectoryAndURLPreferences, 334
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/Config.php, retrieve, 406
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/Config.php, _initVariables, 209
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module, singleton, 320
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module, civicrm_initialize, 386
, civicrm_invoke,
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/includes/menu.inc, call_user_func_array, 516
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/index.php, menu_execute_active_handler, 26

Jun 26 16:09:17  [info] Ignoring exception thrown by nullHandler: -18, DB Error: no such table

Jun 26 16:09:17  [info] $backTrace = /var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 547
, nullHandler,
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 968
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1908
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1221
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2428
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1614
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 166
/var/www/vhosts/domain.com/subdomains/staging/httpdocs/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 903


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: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 12:11:59 pm

sorry, dont know.

Seems like it has something to do with the settings table etc. Might want to ensure you are using a clean working 3.4.5 db. Can you check if there is a civicrm_setting table in your db?

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

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 12:18:16 pm

So, there isn't a civicrm_settings table in my current 3.4.5 DB.   I wasn't sure if this is expected in the 3.4.5 schema, or if my predecessor took it out?

I most likely will have to do a clean install and compare the two databases.

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: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 12:51:58 pm

the setting table was introduced in 4.1. so not having it is correct in 3.4 :)

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

jmickela

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Upgrade from 3.4.5 to 4.1.1 failed - unexpected unrecoverable error
June 27, 2012, 02:26:24 pm
I've tracked the problem down to these lines of code:

Code: [Select]
$onBehalfProfileId = CRM_Core_DAO::getFieldValue( 'CRM_Core_DAO_UFGroup', 'on_behalf_organization', 'id', 'name' );
        if ( ! $onBehalfProfileId ) {
            CRM_Core_Error::fatal( );
        }

This looks in the civicrm_uf_group table for a record that has the value 'on_behalf_organization' in the name column and errors out if one isn't found. Looking at my data, I do not have this value in that table. Can I insert it somehow? What should it be? Why isn't it there?!?

Edit:
I commented out the CRM_Core_Error::fatal( ); and the upgrade went off without a hitch. the value of $onbehalfProfileId is used in:

Code: [Select]
while( $pages->fetch( ) ) {
            $query = "
INSERT INTO civicrm_uf_join
    (is_active, module, entity_table, entity_id, weight, uf_group_id)
VALUES
    (1, 'OnBehalf', 'civicrm_contribution_page', %1, 1, %2)";

            $params = array( 1 => array( $pages->id, 'Integer'),
                             2 => array( $onBehalfProfileId, 'Integer') );
            CRM_Core_DAO::executeQuery( $query, $params );
        }

But on my system $pages->fetch() contains no data to begin with, so regardless of the value of $onbehalfProfileId, it's never used.

My main concern is moving forward with this data. If $onbehalfProfileId is so important that the absence of a value bombs the entire upgrade, even if it isn't actually used, can I rely on my site without it? Or should it be used in all cases? I exceuted the SQL in:

Code: [Select]
$pages = CRM_Core_DAO::executeQuery("
SELECT    civicrm_contribution_page.id
FROM      civicrm_contribution_page
LEFT JOIN civicrm_uf_join ON entity_table = 'civicrm_contribution_page' AND entity_id = civicrm_contribution_page.id AND module = 'OnBehalf'
WHERE     is_for_organization = 1
AND       civicrm_uf_join.id IS NULL
" );

And it came up with nothing. is that another potential problem? Should this SQL *always* return some rows?
« Last Edit: June 27, 2012, 02:46:05 pm by jmickela »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 3.4.5 to 4.1.1 failed - $onbehalfProfileId missing (is it needed?)

This forum was archived on 2017-11-26.