CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Activity contact autocomplete broken in IE
Pages: [1]

Author Topic: Activity contact autocomplete broken in IE  (Read 1982 times)

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Activity contact autocomplete broken in IE
April 01, 2010, 04:17:19 am
As of version 3.1, the activity form contact autocomplete box seems to be broken in IE (all versions). This worked fine in 3.0.4 and earlier. I have reproduced the error on the demo site as well.
It seems to work fine in Firefox/Safari/Chrome, so I suspect it is something to do with the Javascript engine in IE.

The specific issue is that when you visit the standalone 'add activity' form:
/civicrm/activity&reset=1&action=add&context=standalone

and start to type a name in the 'with' or 'assigned to' contact boxes, the autocomplete list appears, but as soon as you click a name from this list, the name is not added to the box at all and (depending on browser Javascript settings) a javascript error message appears.
Some degree of keyboard control is possible. If JS error messages in IE are turned off, it seems you can select an option from the autocomplete list and it is added to the box, but if the messages are turned on, an error message appears when a contact is selected with the keyboard and it is not added.

I have filed an issue for this here:
http://issues.civicrm.org/jira/browse/CRM-6012

There are workarounds to log the activity via the contact screen or search results to pre-fill these boxes, but the standalone form is unusable for ~60% of our users (average % of IE visitors), and this form is used by a lot of our users. I would like to try to resolve this, as it is quite a big issue for our users (I'm getting lots of complaints), many of whom are non-technical and switching to firefox is not an option :(

This must be an issue for other organizations who rely on activity logging too?

I am trying a bit of JS debugging, but it is very slow work and difficult in IE (how I wish for an IE version of firebug!), so if anyone could point me in the right direction I'd be very appreciative. Since this worked fine in 3.0.4, were there any javascript/css/html changes to this form in the 3.1 release which might help isolate the problem?

This seems to be the appropriate page for the changes to the template in 3.1?
http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/templates/CRM/Activity/Form

So I'll look through that as a start but if anyone has any pointers it would be greatly appreciated.

Cheers

Graham

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Re: Activity contact autocomplete broken in IE
April 01, 2010, 04:32:15 am
A quick look through the diffs for the activity form in 3.1 here:
http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/templates/CRM/Activity/Form/Activity.tpl#bv3.1

And I can't see any JS/css changes. The only major change seems to be the inclusion of CRM/common/formnavigate.tpl
Perhaps something in there is causing it?

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Activity contact autocomplete broken in IE
April 06, 2010, 06:08:04 am
Related issue is here : http://issues.civicrm.org/jira/browse/CRM-6012

you might be interesting in patch

kiran
You Are Designed To Choose... Defined By Choice.

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Re: Activity contact autocomplete broken in IE
April 08, 2010, 06:54:20 am
Wow, thanks very much :)
I had tracked the problem to somewhere in the token javascript file, but got lost from then on. Thanks for the fix!

Unfortunately, there are now more problems. The autocomplete works fine now in every browser I tested (bar some errors about 'console' being undefined? with strict security on IE), but now it is impossible to remove people ('tokens') once they are added to the target contact box. Pressing delete/backspace or clicking the cross no longer works.

I get the following JS errors from IE8's error log:

Code: [Select]
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)
Timestamp: Thu, 8 Apr 2010 13:52:16 UTC

Message: 'console' is undefined
Line: 362
Char: 4
Code: 0
URI: /sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?8

Message: 'console' is undefined
Line: 429
Char: 10
Code: 0
URI: /sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?8

Message: 'console' is undefined
Line: 429
Char: 10
Code: 0
URI: /sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?8

Message: 'console' is undefined
Line: 429
Char: 10
Code: 0
URI: /sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?8

Message: 'console' is undefined
Line: 429
Char: 10
Code: 0
URI: /sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?8

Message: 'console' is undefined
Line: 429
Char: 10
Code: 0
URI: /sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?8

Sorry for being annoying :( but its still not working as it did back in 3.0.3

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Re: Activity contact autocomplete broken in IE
April 08, 2010, 07:06:51 am
I looked at the above lines and they seem to be there for firebug notifications, perhaps left over from debugging? I commented them out and everything works fine in IE and firefox.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Activity contact autocomplete broken in IE

This forum was archived on 2017-11-26.