Closed (fixed)
Project:
CiviNode And Civinode CCK
Version:
5.x-1.0
Component:
CCK Integration
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
18 May 2007 at 16:51 UTC
Updated:
5 Jul 2007 at 06:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
Torenware commentedThis appears to be related to multiple values. I may need to alter the schema a bit to change this, since I don't think it allows for multiple values. But once I do this, I'll make sure that the object IDs are set up appropriately to make autocomplete work.
Comment #2
Torenware commentedThis turns out to be fixed by the same code that fixes #145053 (Multiple values not saved). JavaScript was required to make sure that each sub-field has the necessary handlers and DOM IDs to interact with the AJAX code.
A new release is getting tested by some volunteers right now; once they say the code is working for them, I'll post the updated code to CVS.
Comment #3
Torenware commentedI've done some additional minor tweaks and uploaded the new code to HEAD. Please take a look at it, since it looks like I have a first pass at most of the issues the Communications Initiative folk have raised.
Comment #4
dewolfe001 commentedWe did install the new civinode code. We are still not seeing the autocomplete functionality. It looks like dojo.AddOnLoad is not found.
The JS error we're seeing is: "dojo is not defined" and then everything that uses dojo fails as well. It appears that it's coming from these lines:
In addition, when we've swapped these text fields to be rendered as dropdowns, they look fine. When they're rendered as autocomplete fields, they're appearing with only the text of "128" (presumable the reference id# for the current selection)
Comment #5
Torenware commentedCan I get access to your install? There's code that should be loading the dojo libraries (and does on my test installs) that appears not to be running. Two possible causes: a permissions issue that is preventing CiviCRM from generating the dojo headers, and a theming issue where the block that would otherwise include dojo related info is omitted.
Comment #6
Torenware commentedI'm guessing that not all of your JavaScript is being loaded. In a working page, there are several types of JS you should be seeing in a page.
In the HEAD section, you should see a global for Dojo, and the function definitions for the loaders and change handlers for each field:
The individual items are marked as you pointed out in your post. They look correctly formed, with the right kind of DOM ID information. Each dojo AC field has two parts, one visible (with the drop down) and a hidden field to store state information. Here's the items from my test page:
Last, the loader information is at the bottom of the page, just above the closing /BODY tag:
All of these sections should be present in your page. If any are missing, we'll need to see as to why.
Comment #7
Torenware commentedOK, I think I see the problem. You folks run Drupal from a sub directory, which is fine, but not something I test. It turns out I am constructing a URL incorrectly:
Clearly enough, I should not be doing this :-)
I'll see why this occurs, and get a fix up in a bit.
Comment #8
Torenware commentedThe problem turns out to be running Drupal from a sub-directory. I was calculating the path to the dojo.js file incorrectly in those configurations.
I've just checked in a fixed version of civinode_utils.inc into HEAD. If this resolves your problem, I'll likely merge HEAD into the DRUPAL_5 branch.
Comment #9
Torenware commentedI've learned more than any reasonable person should know about how CiviCRM is configured (and mis-configured), and if you have your CiviCRM settings right, autocomplete will work if you use clean URLs, or not, and whereever you install Drupal or CiviCRM.
I've landed the current version as 5.x-1.0, the first official stable version.
Comment #10
(not verified) commented