7

I am the manager of our organizations Drupal/CiviCRM site. Since we are an all-volunteer organization, I have other managing certain aspects of the system.

One of our board members is responsible for ensuring that membership records are up-to-date. For those who elect to pay by check, this means that he has to enter the site and manually enter the fact that the member has paid.

The process he uses for doing this is:

  1. Go to CiviCRM
  2. Type in the name of a contact in the search box, i.e. Smith
  3. Select John Smith from the drop down box
  4. Go to John's Membership Tab where his Pending membership is shown
  5. Click on more, Renew

When he does this, he gets Network Error - Unable to reach the server.

I tried to duplicate this situation by giving my personal account (not the admin account) the same level of privilege as his account (note that I have the CiviGroup Roles Sync module installed, so this simply entails giving my account the same Role as his), logging into the system using a different browser (after deleting history, cookies, etc.), and following the same sequence outlined above. When I did this, the error did not occur.

Details:

  • Drupal 7.37
  • CiviCRM 4.6.3
  • Permissions enabled: access administration menu; CivCRM: add contacts, view all contacts, edit all contacts, view my contact, edit my contact, delete contacts, access deleted contacts, import contacts, skip IDS check, profile listings and forms, profile listings, profile create profile edit, access CiviCRM, access contact dashboard, administer reserved groups, merge duplicate contacts, view all notes, access contact reference fields, access CiviContribute, edit contributions, access CiviMember, edit memberships, delete in CiviMember, access CiviMail, access CiviReport, access Report Criteria; use the administration pages and help; administer users; view user profiles

Can you please suggest why my colleague is getting this error and I am not? If not this, can you suggest some tests that can be run on his computer to try to get to the root cause of the problem?

  • 1
    We get that error occasionally. A refresh and retry usually solves it for us. This is going to sound silly, but have you watched this person do it or had them try again? Have you logged on as the user and tried it? – pmoz Jun 14 '15 at 17:37
  • Thank you. I just tried logging in as him and did not get the error. Will keep digging. – GRoston Jun 14 '15 at 20:09
  • Had my colleague try again using IE and the problem did not occur. Thus, the problem relates to Chrome on his machine. Thanks all for the help! – GRoston Jun 14 '15 at 21:26
  • We are also having this issue when trying to update credit card information for recurring contributions. From the contact record > Contributions tab > Scroll to bottom > the "more" link under Recurring Contributions > change billing details. Pops up a box that doesn't load anything, then is replaced with a error message of "Unable to reach the server. Please refresh this page in your browser and try again." (But this action doesn't fix the problem.) – Lyz Liddell Jun 15 '15 at 20:17
  • @LyzLiddell please go through these troubleshooting steps and post a new question with the information you gather. – Coleman Jun 17 '15 at 1:19
11

If you're not having this trouble but your colleague is, a very common issue is sessions on www/no-www or HTTP/HTTPS URLs. CiviCRM's base URL is hard-coded in the settings file, and while you can follow relative links around the site for a while, some links will be generated from that URL.

Let's say you have a site that's accessible at http://www.example.org and http://example.org. civicrm.settings.php has http://example.org as the base URL. If your colleague logs into Drupal at http://www.example.org/user and follows links from there, everything may be fine until he hits a URL that CiviCRM generates from the base URL. It'll be http://example.org/whatever, and Drupal will deny access, since there's no session at example.org--just at www.example.org.

I don't think it's necessarily precisely this, but I think it may be something similar. Maybe your colleague logs in at http://www.example.org instead of https://www.example.org. Maybe you have SSL enabled only for www.example.org, or maybe there's a redirect that's cached funny.

The way to avoid this is to make sure three of the following four URL variations all redirect to the fourth: - http://www.example.org - http://example.org - https://www.example.org - https://example.org

It doesn't matter whether you pick https://www.example.org or https://example.org as your official URL, but have everything redirect there and set that as the base URL in civicrm.settings.php.

Although I think something like this is probably the issue, Jon's answer is a good general process for debugging this sort of thing.

  • Andrew - I ran into a similar issue recently and your suggestion is actually fairly close to the solution I found. The issue relates to the use canonical name. Specifically, the issue was resolved by uncommenting the lines in .htaccess that rewrite www.mydomain.com to mydomain.com. – GRoston Oct 17 '15 at 14:34
4

There are a number of reasons they could be getting this error and you're not. Here are the tests to try:

  • There could be something on your colleague's computer (e.g. a browser plugin) that's affecting the URL being generated. Though unlikely, you'll potentially save yourself a lot of grief by testing this first! To test, use your computer with his login.
  • Next test: Open the Net tab in your Developer Tools (F12 in Firefox or Chrome) before loading the page and look for errors there. If you find some you can't interpret, please update your question with them.
  • Most important test - watch the web server's error log as your colleague triggers the problem.
  • Also - on Civi 4.6, the "Renew" dialog pops up in a modal dialog by default. If you copy the URL and paste it into a new tab to do these tests, you'll have an easier time troubleshooting: the Net tab won't be as cluttered and you can easily retest by reloading the page.
  • 1
    You can also test whether it's a Chrome problem vs. a settings-in-Chrome problem by having your colleague try opening an incognito window and logging in from there. Incognito will bypass caching and other preferences that may be causing problems. – Andrew Hunt Jun 15 '15 at 17:10
1

I fixed it:

This error can occur when you migrate the server and the database user is different on your new server.

I got this error and this is how I solved:

In your civicrm -> ConfigAndLog look for the most recent edited file (to do this run command $ls -ltr, your most recent file is listed in the end). Open that file and look for your old db username or for Fatal Error or DB Error.

This is what I got: "execute command denied to user 'myOLDuser'@'localhost' for routine 'mycivicrmdb.civicrm_strip_non_numeric']

To fix this I ran the SQL : UPDATE mysql.proc SET definer = 'myNEWuser@localhost' WHERE db = 'mycivicrmdb';

For the SQL read https://stackoverflow.com/questions/10169960/mysql-error-1449-the-user-specified-as-a-definer-does-not-exist

1

Check CIVICRM_UF_BASEURL in civicrm.settings.php file. If your site base url is like http://www.example.com then set the base url like below

define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/');

Node Don't forget to add www.

  • This was my issue. Once I had changed the CIVICRM_UF_BASEURL to match the site/Drupal site URL everything worked. – Ben Dec 12 '17 at 16:56
0

I ran into this problem today.

Initially I thought that it was a problem with define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/'); In my case I am using a secure https://www.example.com/ but my civicrm.settings.php has the stock non-secure http://www.example.com/.

That was not the case so I enabled troubleshooting to log errors to the drupal watchdog log.

The error that was logged indicated that the civicrm_contact_log table was corrupted.

Honestly I couldn't see the problem but I used the repair tool in PHPMyAdmin and it corrected whatever was going on.

I hope this helps someone else.

Andrew

0

I encountered this error today on the Events tab, following an upgrade, and it was because I had not executed the 'only_group_by' change required here https://docs.civicrm.org/sysadmin/en/latest/requirements/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.