The latest release breaks the autofill when using a contact reference with cck. I downgraded back to 5.x-1.1 and it works fine.

Comments

Anonymous’s picture

I am testing the cck function with CiviCRM 1.9, Drupal 5.5 and dojo search (autofill) is not working, drop down is ok.

When going to the managefields page for editing the field (or deleting it) there is a page not found error. In log there is a message:

Type page not found
Locatie http://www.site.nl/ules/civicrm/packages/dojo/dojo.js 
Doorverwijzer http://www.site.nl/admin/content/types/ambassadeurs/fields 
Bericht ules/civicrm/packages/dojo/dojo.js 

there is a search to 'ules/civicrm/packages/dojo/dojo.js'
it should be: 'modules/civicrm/packages/dojo/dojo.js'

Anonymous’s picture

Confirming this error. Doesn't appear the dojo .js is loading, get two errors in firebug:

1) Dojo is not defined: dojo.addOnLoad(init_cbox_);
2) Dojo is not defined: dojo.require('dojo.widget.ComboBox');

These look to be called in the civinode_util.inc file, the callback function lines 1471 - 1496.

Played around with setting the js path, but it is doing more than loading the js there & couldn't get it working... path to the js on my install is: sites/all/modules/civicrm/packages/dojo/dojo.js

syoumans’s picture

I was having this problem too, however I now believe it to have been a configuration issue.

I was using the same Civi database for two different sandboxes (one sandbox for testing and one for development). Turns out the new CiviNode module determines its paths differently from the old civinode module: it gets its paths from values in the civi database. Once I created a separate civi database with the correct resource paths, this version of civinode worked out of the box.

I no longer see the JavaScript errors and the widgets work as expected.

Could the problems you're seeing be related to having multiple sites accessing the same civi database?

Anonymous’s picture

Yes

Both sites are life. One is for the public (event registration, newsletter accounts) and one is an extranet backoffice (Civimail, relation management).

Reading your feedback, maybe I should make my path setup to the public domain, the current setup is pointing to the extranet domain.

regards

steve.m’s picture

This is also broken for me in 5.x-1.1 because it leaves a leading '/' on the $base path. I corrected this by just adding one to the strlen result in civinode_utils.inc:
$base = substr($resbase, strlen($url_base)+1);

And it's broken for me in 5.x-1.2 because of symlinks: my drupal root is located in /home/drupal_5, but I'm using a symlink from /home/drupal -> /home/drupal_5, and use /home/drupal in my config files. The module relies on $_SERVER['DOCUMENT_ROOT'] and $civicrm_root beginning with the same number of base characters. Unfortunately, $_SERVER returns the real path, whereas $civicrm_root uses the symlink, so $base winds up 2 characters too short.

sutharsan’s picture

It is also broken for me. Got it working by adding a slash to the base:

<?php
function _civinode_get_path($item = 'base') {
  global $civicrm_root;
  $docroot = $_SERVER['DOCUMENT_ROOT'];
  $len = strlen($docroot);
  $base = substr($civicrm_root, $len + 1);
    switch ($item) {
    case 'ajax':
      return $base . "/extern/ajax.php";
    case 'dojo_lib':
      return $base . "/packages/dojo/dojo.js";
    default:
      return $base ."/";
  }
}
?>

For debug and development purposes I give these values:
$civicrm_root: /var/www/test1234/sites/all/modules/civicrm
$docroot: /var/www/test1234
$base: sites/all/modules/civicrm

base_path(): /
drupal_get_path('module', 'civicrm'): sites/all/modules/civicrm/drupal