Using "services_client_connection_get('name of connection');" in a module throws

ServicesClientConnectionException: Missing class in services_client_connection_get_plugin() (line 131 of --path--/sites/all/modules/services_client/services_client_connection/services_client_connection.module).

A ctools thing?

CommentFileSizeAuthor
#3 1661080-missing-plugin.patch2.86 KBmhrabovcin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kasalla’s picture

After some debugging, I found out, that this error occures when theres no auth-method given.
no auth = no class = crash

 protected function getPlugin($type) {
    // Load plugin class
    $name = $this->connection->config[$type]['plugin']; // IS EMPTY FOR AUTH
    
    #drupal_set_message("<pre>".print_r($this->connection->config,1)."</pre>"); //THE OTHER CLASSES ARE OK
    $plugin = services_client_connection_get_plugin($type, $name, $this->connection, $this->connection->config[$type]['config'], $this);
    return $plugin;
Nick_vh’s picture

Status: Active » Needs work

Could you provide us with a patch that improves this process?

mhrabovcin’s picture

Title: Cannot get connection » Missing auth plugin definition throw PHP exception in services_client_connectin_get
Status: Needs work » Needs review
FileSize
2.86 KB

Adding patch which will prevent PHP errors when auth plugin is missing.

mhrabovcin’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x, marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.