When typing, it makes the ajax requests but if it finds any results, I get the following in my console:

TypeError: d[c] is undefined

... b;return b=this.get_opt("search_key"),a=this.callbacks("sorter").call(this,this...

CommentFileSizeAuthor
#7 tag-user-with-display-name.patch710 bytesankitsingh0188

Comments

TheMGamer’s picture

Anyone?

heylookalive’s picture

Apologies for the wait, are you running jquery_update at all? If so what version? Also which OS and browser?

TheMGamer’s picture

jQuery Update with jQuery version v1.7 (I tried also 1.8, 1.10)

Mozilla Firefox on Windows 7.

I made the test in a clean drupal 7 enviroment with no other modules. Just the core and the required modules and scripts for at.js

TheMGamer’s picture

Priority: Major » Critical

I tested again. This time, the autocomplete still does not show but I get no errors in the browser's console. Can you reproduce this?

JakeWilund’s picture

I am getting the following error in the browser console:
Uncaught TypeError: undefined is not a function

Autocomplete is currently not triggering. Libraries installed per the readme's instructions.

heylookalive’s picture

Hey, I've replicated the error but it's not immediately obvious as to what's going wrong. I expect that the library maintainer has tweaked how something works and is breaking things as a result. Right not I don't have any time to fix this but will loop back as soon as possible. Sponsorship would also help if people are desperate.

ankitsingh0188’s picture

Assigned: Unassigned » ankitsingh0188
Status: Active » Needs review
StatusFileSize
new710 bytes

Hey,

I have completed the autocomplete on the basis of Fields. Earlier it used to work for property only.

Autocomplete with fields it throws the error (TypeError: d[c] is undefined) is undefined.

I have created a patch for that and test it. It works for me.

Thanks!

crazyrohila’s picture

Assigned: ankitsingh0188 » Unassigned
Status: Needs review » Reviewed & tested by the community

Just to add details for above patch:

I got the same issue when using this module (7.x-1.x-dev) with tinymce. What I found is in sorter function of atjs search_key is "
" in case of property but when we select field as search key in configuration then "field:" is going as search_key and the listener has only "" as object property. eg. I select property name as search key, so listener has {search_key: 'name'} and results also has "name" value. but If I select display_name (a user field) as search key then listener has {search_key: 'field:field_display_name'} but results has field_display_name as key in objects. so it's showing error d[c] is undefined where d is result and c is 'field:field_display_name'. So in module when module is settings js listener variable, it replaces 'property:' with '' (line #237) and we get only name of property same we need to do for fields. So what @Ankit did above solved our problem and we can search with user fields.

Hope this makes sense.

david.hughes’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch - just applied it.

Status: Fixed » Closed (fixed)

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