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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Autocomplete Not Working
Pages: [1] 2

Author Topic: Autocomplete Not Working  (Read 1699 times)

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Autocomplete Not Working
March 13, 2015, 02:02:01 pm
Contact, Event Search - no autocomplete fields will work.

I see a Mixed Content warning, looks like a call back to the site is using http instead of https, but I don't know from where. All settings and config files reference https

I've tried disabling forced SSL as well as enforced a redirect from http to https. Makes no difference.
Site debugging turns up nothing - all I see in debug window for firebug, etc. is the mixed content warning.

Magic quotes are turned off.

Am at my wits end, as it means I cannot create event registrations and relationships on the backend of the site.

Joomla 2.5.28
Civi 4.5.8
PHP Version    5.4.32

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Autocomplete Not Working
March 13, 2015, 06:48:44 pm
Sounds like you went through many of the steps here already, but you might want to double-check http://forum.civicrm.org/index.php/topic,35850.0.html
Try asking your question on the new CiviCRM help site.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 14, 2015, 12:51:49 pm
Yup - went over those instructions with a fine tooth comb.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Autocomplete Not Working
March 14, 2015, 12:55:00 pm
When you say that autocomplete fields don't work, do you mean they don't render at all (just look like empty textboxes) or they do render but fail to fetch results?
In the latter case, can you paste in the server response from the ajax call?
Try asking your question on the new CiviCRM help site.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 16, 2015, 07:27:26 am
It looks like they render and don't fetch results. The spinner is visible, but nothing is found.

Can you give me nudge towards what log I'd check to see that server response? I have access to the server at root level, so I can pretty much get you whatever you want if I know where to find it.

Thanks, Coleman!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Autocomplete Not Working
March 16, 2015, 07:37:47 am
Just from the browser console, when you type in a few letters you ought to see the result of the ajax request. In FF this will be on the console tab, in Chrome it will be in the network tab.
Try asking your question on the new CiviCRM help site.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 16, 2015, 08:44:59 am
here's a screenshot of the network console that shows the ajax call.

I see 302 errors, which are redirects, but I have no redirects in place for the site.

I can send you the log from the crm.ajax.js call too if that's helpful

here's the console log:

https://soar.on.ca/administrator/ [HTTP/1.1 302 Found 86ms]
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] administrator
Blocked loading mixed active content "http://soar.on.ca/"[Learn More] index.php
GET
XHR
https://soar.on.ca/administrator/ [HTTP/1.1 302 Found 2201ms]
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] administrator

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 16, 2015, 08:49:20 am
Here's the console log from Chrome, if it's helpful.

Mixed Content: The page at 'https://soar.on.ca/administrator/index.php?option=com_civicrm' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://soar.on.ca/'. This request has been blocked; the content must be served over HTTPS.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Autocomplete Not Working
March 16, 2015, 09:09:55 am
And there's your answer: your site is https but the ajax call is happening over http, an your web browser is blocking it due to security (as it should).
Check your base url settings in Administer->System Settings->Directories and also $civicrm_root in civicrm.settings.php
Try asking your question on the new CiviCRM help site.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 16, 2015, 09:28:32 am
Quote from: Coleman Watts on March 16, 2015, 09:09:55 am
And there's your answer: your site is https but the ajax call is happening over http, an your web browser is blocking it due to security (as it should).
Check your base url settings in Administer->System Settings->Directories and also $civicrm_root in civicrm.settings.php


I think you mean Resource URLs not Directories. Those were the first things I checked when this started happening. Both use https://soar.on.ca as does the Base URL in Cleanup Caches & Update Paths

I've tried it with both Force SSL and Verify SSL on and off, with no change.

I've cleaned out the cache and the templates_c directory too.

Not my first rodeo.  ;D
« Last Edit: March 16, 2015, 10:00:38 am by penguintrax »

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 16, 2015, 12:55:06 pm
Oddly enough, I have another 4.5.8 site on the same server, also with nonfunctional autocomplete fields.

I'm getting this console error for the autocomplete in Register an Event Participant.

jquery-1.11.1.min.js?r=IAk1t:4 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

Contact search doesn't event display the spinner.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 17, 2015, 09:50:55 am
Son of a b....

It was mod security on the server. Need to figure out what setting changed that screwed this up, but we disabled it temporarily and sure enough, everything is working again.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Autocomplete Not Working
March 17, 2015, 10:03:28 am
Nice job finding it.
If you find out more specifics about mod_security and how to configure it so it doesn't conflict with Civi, please let me know and I'll add it to the troubleshooting page.
Try asking your question on the new CiviCRM help site.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 17, 2015, 10:04:42 am
Will do, Coleman. Thanks for the support!

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Autocomplete Not Working
March 17, 2015, 11:36:45 am
Coleman - these are the rules we disabled and autocomplete started working as it should. It also fixed an issue whereby I could display the CiviEvent feed in a Joomla module position.

Here is the list of rules and their descriptions. These rules are all part of the free set from OWASP:

REQUEST-41-APPLICATION-ATTACK-SQLI
The configuration file path:
modsec_vendor_configs/OWASP/rules/REQUEST-41-APPLICATION-ATTACK-SQLI.conf

The rules in this configuration file enables protection against SQL injection attacks. During a SQL injection attack,  a client is able to pass a specially crafted HTTP request to the server. This HTTP request causes the server to mistakenly execute a malicious query.
REQUEST-43-APPLICATION-ATTACK-SESSION-FIXATION
The configuration file path:
modsec_vendor_configs/OWASP/rules/REQUEST-43-APPLICATION-ATTACK-SESSION-FIXATION.conf

The rules in this configuration file enable protection against Session Fixation attacks. During a Session Fixation attack, attackers to force a user's session ID to be predictable. With the session ID, the attacker can take over a session that belongs to another user.
REQUEST-49-BLOCKING-EVALUATION
The configuration file path:
modsec_vendor_configs/OWASP/rules/REQUEST-49-BLOCKING-EVALUATION.conf

The rules in this configuration file blocks traffic that various other configuration files request.

Warning:

Other rules in the rule set depend on this configuration file to block incoming attacks. If you disable this configuration file, other rules will detect, but not block, incoming attacks.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Autocomplete Not Working

This forum was archived on 2017-11-26.