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) »
  • Upgrading Old Code and DomainID
Pages: [1]

Author Topic: Upgrading Old Code and DomainID  (Read 2075 times)

dandaman

  • Guest
Upgrading Old Code and DomainID
November 18, 2008, 12:20:22 pm
I'm hoping that someone can point me into the right direction.  I had some custom code (well, based on the bin/ProcessAuthorizeReport.php file) and since upgrading to 2.1, it's not working.  Here's the main problem:

The code uses "CRM_Core_Config::domainID()" but I found that this function just returns me an error:

Code: [Select]
    static function domainID( )
    {
        CRM_Core_Error::backtrace( 'Aborting due to invalid call to domainID' );
    }

Where's the new place to get the domainID?  I tried looking around in the API section, but either I couldn't find it or I didn't look around that much.  If you could give me a couple hints of where to go, that'd be great.

Thanks,

Dan

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: Upgrading Old Code and DomainID
November 18, 2008, 12:35:49 pm

the concept of domainID has been obsoleted in 2.1. Any specific reason you need domainID? The tables do not reference domain_id any more. There is still a civicrm_domian table and we get some meta information from there for civimail

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

dandaman

  • Guest
Re: Upgrading Old Code and DomainID
November 19, 2008, 08:18:49 am
Lobo,

Thanks.  I'm working on trying to get the bin/ProcessAuthorizeReport.php script working, and getting rid of the domain ID seemed to help.  I had a version working on CiviCRM 2.0, but the upgrade to 2.1 has apparently borked it.  However, now I get this error:

Code: [Select]
Fatal error: Call to undefined method CRM_Utils_Hook_Soap::invoke() in /var/www/vhosts/fcci.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php(57) : eval()'d code on line 1
It seems that my "CRM_Core_Config" object is returning "CRM_Utils_Hook_Soap" for the "$config->userHookClass" variable, but that surely doesn't have an "invoke()" method.  Is this an error or a change in the API or what?  Was my site upgraded wrong and it shouldn't be returning "CRM_Utils_Hook_Soap"?

Thanks,

Dan



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: Upgrading Old Code and DomainID
November 20, 2008, 12:04:34 pm

hey dan:

you should modify the file and delete lines: 155 - 158, i.e. change

Code: [Select]
        $config =& CRM_Core_Config::singleton( );
        $config->userFramework          = 'Soap';
        $config->userFrameworkClass     = 'CRM_Utils_System_Soap';
        $config->userHookClass          = 'CRM_Utils_Hook_Soap';

to

Code: [Select]
        $config =& CRM_Core_Config::singleton( );

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrading Old Code and DomainID

This forum was archived on 2017-11-26.