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) »
  • [SOLVED] Network Error when selecting View or Edit
Pages: [1]

Author Topic: [SOLVED] Network Error when selecting View or Edit  (Read 1656 times)

ArthurC

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.32
  • PHP version: 5.3.27
[SOLVED] Network Error when selecting View or Edit
November 15, 2014, 04:23:56 pm
When a logged in CiviCRM user selects View or Edit for a Subscription form, the new window is blank, and the error message is "Network Error: Unable to reach the server. Please refresh this page in your browser and try again." See the attached screen clip.

We encountered this error first in 4.5.2 and now in 4.5.3.  It happens in Firefox, IE, Chrome; on Vista and Windows 7, on a multitude of different computers in different cities in Canada. I am in another city, so can't actually sit down with the users experiencing the problem. On my computers - Windows 8.1, Vista, an iPhone (Safari) and an old Android phone - as well as other computers that I have tried this on (public library, my wife's) I never get the problem.

I can sign on as one of the other users, and I still don't get the problem. They can sign on as me, and they still get the problem.

The easiest way to get to the problem is to login (it's a Drupal site), go to CiviCRM, click on any contact who has a subscription (we're a magazine), then click on either the View or Edit link associated with a subscription. Immediately, the new window pops up blank, with the error message.

There are a number of "Network Error" threads here, but none of them seem quite like this. If you can point me to one that is like this, or can suggest some more testing we can do to help narrow this down, thank-you. There is nothing in the error message to suggest it's an Ajax issue, but some of the other threads point to Ajax. I don't know how to test this.

All help is welcome. This is a show stopper - we can't conduct business at the moment. Thank-you.
« Last Edit: November 20, 2014, 02:22:46 pm by Coleman Watts »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Network Error when selecting View or Edit
November 15, 2014, 04:39:12 pm
The most important thing missing from that screenshot is the browser's console, so we can see what the error actually is.
Try asking your question on the new CiviCRM help site.

ArthurC

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.32
  • PHP version: 5.3.27
Re: Network Error when selecting View or Edit
November 15, 2014, 04:49:30 pm
Coleman - Thank-you so much for your quick reply. Please tell me which browser you would like us to use, and the steps required to use the console, I will get someone to duplicate the error for us. (I can't produce the error on any of my machines.)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Network Error when selecting View or Edit
November 15, 2014, 05:14:19 pm
I'm most familiar with FF & Chrome, in either of those browsers you can hit F12 and it opens up the console. If you then are able to reproduce the problem you should see some red error messages there. Or if not you will at least be able to inspect the most recent ajax request and view the results, which will likely be some error message coming from the server. Please copy this as completely as possible.
Try asking your question on the new CiviCRM help site.

ArthurC

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.32
  • PHP version: 5.3.27
Re: Network Error when selecting View or Edit
November 16, 2014, 01:23:37 pm
Here is an error message. I have replaced the actual domain name and user with "mydomain" and "myuser". Hope that's okay.

Quote
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://crmws.mydomain.ca/index.php?q=civicrm/contact/view/membership&action=view&reset=1&cid=4&id=2789&context=membership&selectedChild=member&snippet=json. This can be fixed by moving the resource to the same domain or enabling CORS.

Looking into the same origin policy and cross origin requests, I think I understand what that's about, in general, but certainly not specifically. Nor can I figure out how it plays out when one bunch of computers and phones and browsers area able to process these View and Edit requests and another other set of clients encounter the blank windows and "Network Error" messages.

In the forums I did see a note, probably from you, Coleman, talking about ensuring consistency between "admin/system settings/directories" and "admin/system settings/resource urls'. Ours are inconsistent, as shown here. Which should be changed? Will it make a difference?

settings.civicrm.php contains a base url of http://crmws.mydomain.ca/'

"admin/system settings/directories" looks like this:
  • Temporary Files - /home/myuser/crmws/sites/default/files/civicrm/upload/
  • Images - /home/myuser/crmws/sites/default/files/civicrm/persist/contribute/
  • Custom Files - /home/myuser/crmws/sites/default/files/civicrm/custom/
  • Custom Templates - /home/myuser/crmws/sites/default/files/civicrm/templates custom/
  • Custom PHP Path Directory    - blank
  • CiviCRM Extensions Directory - blank

"admin/system settings/resource urls" looks like this:
  • CiviCRM Resource URL - http://crmws.mydomain.ca/sites/all/modules/civicrm
  • Image Upload URL - http://crmws.mydomain.ca/sites/default/files/civicrm/persist/contribute/
  • Custom css URL - blank
  • Extension Resource URL - blank
   

Thanks again. Arthur

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Network Error when selecting View or Edit
November 16, 2014, 01:41:10 pm
I think the biggest reason for same-origin policy problems is when you have inconsistency between http://mysite.org and http://www.mysite.org.
Try asking your question on the new CiviCRM help site.

ArthurC

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.32
  • PHP version: 5.3.27
Re: Network Error when selecting View or Edit
November 16, 2014, 02:09:09 pm
If I understand, you are suggesting that the error message - "Cross-Origin Request Blocked: The Same Origin Policy ..." is probably unrelated to what's in the administration configuration settings which I noted above? I don't think we'll have any http://www ... instances because CiviCRM is configured as a subdomain already (crmws.mydomain.ca) we wouldn't have put a www in front of that because it's too unwieldy.

Is there anything in the error message that you can use to point us to a possibly source of the problem, or the next step in diagnosing the problem?

Thanks.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Network Error when selecting View or Edit
November 16, 2014, 02:25:33 pm
The settings may be to blame, but for pinpointing the problem all you need is the web browser. The way to diagnose same-origin problems is to look at the url of the ajax request and compare it with the current url of your browser. I can't dianose it from here because that latter detail is missing from your bug report, but I'll bet they are subtly different (https vs http or maybe there is a stray www in there somewhere).
Try asking your question on the new CiviCRM help site.

ArthurC

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.32
  • PHP version: 5.3.27
Re: Network Error when selecting View or Edit
November 20, 2014, 01:58:33 pm
Problem solved. Somewhat embarrassing, because in the end it proved to be so simple: users for whom it worked were working in the URL http://crmws.mydomain..., and users for whom it did not work (blank screen, error message) were working in the URL http://www.crmws.mydomain .... Thanks, Coleman, for the advice.


Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: [SOLVED] Network Error when selecting View or Edit
November 20, 2014, 02:26:55 pm
Glad you got it solved :)
Also, be sure to join us on our new help site - we need a few more commits to get it going: http://area51.stackexchange.com/proposals/77367
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [SOLVED] Network Error when selecting View or Edit

This forum was archived on 2017-11-26.