My site is set up to force https on the login page (which keeps the user in https). When trying to enter content into a node reference field I get the following js alert "An HTTP error 0 occurred. /nodereference/autocomplete//"
If I manually change the content create page to http (instead of the https in the above case) the node reference auto complete works just fine. It looks like the auto complete query is referencing the http version of the site and failing.
Comments
Comment #1
eatrocks commentedThis doesn't seem to be a bug in the cck nodereference module. After careful debugging it seems as if this is a result of how we are doing ssl off loading, and of how Drupal is checking if a site is https. By adding SetEnv HTTPS on to our port 443 virtual host entry, we were able to fix the issue.
Comment #2
semantric commentedCould you elaborate on what causes this? I'm facing the same issue, would really appreciate it.
Comment #3
semantric commentedFigured it out, for anyone who finds this -- you have to both make sure the server variable is set and also NOT have a hard-coded "http://..." $base_url in your settings.php.
Comment #4
gdsoe commented#1 solution works for me. Thanks for the tip. You just need to add below lines in your Apache config.