Hello, I'm using CCK autocomplete widget but when I type the first letter in the text box I get a 302 http error. If I click ok to the error, then continue typing inside the text box the error is still present but at least I'm able to save the value. Have anyone experienced similar error or knows how to fix it? I really need a way to allow a user, with the right access permissions, to submit data.

Ideally, I needed a select list with an option to add new values to the list. Since there is not a functionality in CCK that allows that, I looked at the autocomplete widget that gives the user an option to add new records or select from existing ones.

Please advice.

Comments

markus_petrux’s picture

Status: Active » Fixed

The 302 http error is a redirection status. This is probably caused by something not really common in your installation.

The autocomplete widgets (AW) module does not provide javascript of its own, but it simply reuses this behavior as provided by Drupal itself, which is the same approach taken by node reference autocomplete, user autocomplete, etc.

If other autocomplete widgets work for you, then it could be something related to the path used by AW. Maybe you need to adjust web server configuration for this. The path is autocomplete_widgets/[type_name]/[field_name]/[typed string].

luthien’s picture

Thanks for the prompt reply! where or how do I adjust the path to autocomplete_widgets/[type_name]/[field_name]/[typed string] ?

markus_petrux’s picture

Nope, this is hardcoded in the module. You shouldn't change this.

Please, try if a nodereference using autocomplete widget works for you. If it doesn't, then there seems to be a problem not related to this module, but common to all autocomplete widgets.

If nodereferences work for you, then there is something in your site configuration that is breaking the autocomplete widget for this module. But this is very rare as this module uses Drupal core components to perform the AJAX requests, the same as nodereference and other fields with this kind of behavior.

luthien’s picture

Yes, the nodereference using the widget is working fine. I will keep looking for a solution to the problem. If you have any other ideas on how to solve it please let me know.

Thanks

markus_petrux’s picture

It might be caused by another module that is performing a redirection here. Modules that do something like this are SecurePages, Logon related modules, etc. Often, these modules have a settings screen where you can whitelist paths, etc.

luthien’s picture

I found the error thanks to your post.

Secure Pages (/admin/build/securepages) had the following setting for autocomplete:

The ID for excluding or including this element is admin/build/securepages.edit-securepages-pages.
Ignore pages:

*/autocomplete/*

I added an extra line: autocomplete_widgets/*

and that fixed the problem.

Thanks!!!

markus_petrux’s picture

Aha! Good to know! :)

Status: Fixed » Closed (fixed)

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