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 CiviMail »
  • Using CiviSMTP (Moderator: shane) »
  • IMPORTANT: Patch for SOAP "Invalid Key" error on Joomla & CCRM 4.5.0+
Pages: [1]

Author Topic: IMPORTANT: Patch for SOAP "Invalid Key" error on Joomla & CCRM 4.5.0+  (Read 326 times)

shane

  • Moderator
  • I post frequently
  • *****
  • Posts: 265
  • Karma: 16
IMPORTANT: Patch for SOAP "Invalid Key" error on Joomla & CCRM 4.5.0+
June 03, 2016, 02:17:40 am
If you are running CCRM 4.5.0+ on Joomla and are seeing "Invalid Key" error during SOAP calls, please apply the following changes to the files below:

1. In <path_to_joomla>/administrator/components/com_civicrm/civicrm/extern/soap.php

remove or comment out the following lines:
Code: [Select]
session_start();
...
Code: [Select]
$server->setPersistence(SOAP_PERSISTENCE_SESSION);

2. In <path_to_joomla>/administrator/components/com_civicrm/civicrm/CRM/Utils/SoapServer.php

add the lines below that have a "+" at the beginning of the line:

Code: [Select]
   
    public function verify($key) {
      $session = CRM_Core_Session::singleton();
+     // code changes proposed in CRM-8638: CRM_Core_Session uses Drupal's session handler, so the CMS
+     // must first be bootstrapped in order to recover session values
+     if ($this->ufClass == 'CRM_Utils_System_Joomla' && !CRM_Utils_System::loadBootStrap(array(), FALSE, FALSE)) {
+         throw new SoapFault('Server', 'Unable to bootstrap system');
+     }
     
      $soap_key = $session->get('soap_key');
      $t = time();

We have filed a bug with CiviCRM here:

https://issues.civicrm.org/jira/browse/CRM-16697

Additionally, in CiviCRM 4.7.11+ you will need to make the following change:

In <path_to_joomla>/administrator/components/com_civicrm/civicrm/CRM/Utils/SoapServer.php

Find and replace the following line of code:

Code: [Select]
$result = CRM_Utils_System::authenticate($name, $pass, $loadCMSBootstrap);
With the following 2 lines of code:

Code: [Select]
    $ufInstance = new $this->ufClass();
    $result = $ufInstance->authenticate($name, $pass, $loadCMSBootstrap);


Please email us at support@civismtp.com if you have any issues or questions about this.
« Last Edit: March 13, 2017, 12:34:29 pm by shane »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using CiviSMTP (Moderator: shane) »
  • IMPORTANT: Patch for SOAP "Invalid Key" error on Joomla & CCRM 4.5.0+

This forum was archived on 2017-11-26.