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 »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Problems with setting CiviCRM resource URL
Pages: [1]

Author Topic: Problems with setting CiviCRM resource URL  (Read 2720 times)

rogerco

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 5
Problems with setting CiviCRM resource URL
August 21, 2008, 06:52:13 am
I've come across an odd problem with resource URL generating errors on page load, typically 'could not load dojo.nls.commonWidgets_en-gb'

The site can be accessed as either http://mydomain.com or http://www.mydomain.com - both get used

The resource URL is set to http://mydomain.com//administrator/components/com_civicrm/civicrm/

This works fine so long as the urls used to access the site (and internally) are all of the http://mydomain.com form, but generates errors if www. is used in the url

Contrarywise if the resource url includes the www then leaving it out when accessing the site generates the error.

There must be a workaround?

RogerCO

rogerco

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 5
SOLVED Re: Problems with setting CiviCRM resource URL
August 21, 2008, 07:45:33 am
5 minutes thought after original posting and a quick test later...
The simple workaround of course is to use .htaccess to rewrite the wrong form of url

  Options +FollowSymLinks
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^mydomain\.com
  RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=permanent,L]

The first two lines will already be there if you've got Joomla SEF turned on and are using the htaccess.txt file renamed to .htaccess

If your installation is in a subdirectory off the web root you'll need to add that to the fourth line (or put the .htaccess in the webroot which will then affect the whole site.

Hope this saves someone else a few moments.

RogerCO

Edit - if you want it the other way round use:
    RewriteCond %{HTTP_HOST} ^www.mydomain\.com
    RewriteRule ^(.*)$ http://mydomain.com/$1 [R=permanent,L]
but you worked that out for yourself...
« Last Edit: August 21, 2008, 07:47:42 am by rogerco »

kwixson

  • Guest
Re: Problems with setting CiviCRM resource URL
June 24, 2009, 12:36:28 pm
Yes! Posting this in so people can find it easier, and understand the answer better. My problem was that I was forgetting to enter in the www. before the domain. So was my client. So, buy simply going to https://www.charitableunion.org instead of https://charitableunion.org, I stopped getting this error. A very meddlesome problem. One would think the code could be written to account for this potential user error. The specific error I was getting, and again I'm including this just to help people find this post, was:

failed loading https://www.charitableunion.org/sites/all/modules/civicrm/packages/dojo/dojo/./nls/commonWidgets_en-us.js with error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "https://www.charitableunion.org/sites/all/modules/civicrm/packages/dojo/dojo/dojo.js Line: 20"]dojo.js (line 20)

Could not load 'dojo.nls.commonWidgets_en-us'; last tried './nls/commonWidgets_en-us.js'
[Break on this error] (function(){var _1=null;if((_1||(typeof ...equire,"dojo['require'](item);");}}})();
dojo.js (line 20)

[Exception... "'Error: Bundle not found: loading in dijit , locale=en-us' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

pboom

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 3.4.8
  • CMS version: Joomla 1.5.25
  • MySQL version: 5.1.56
  • PHP version: 5.2 ?
Re: Problems with setting CiviCRM resource URL
January 25, 2012, 05:54:13 pm
Thanks for posting this solution it's saved me endless headaches.
Amazing how what takes one person 5 minutes to fix will keep a newbie like me puzzled for hours.

In my case everything worked till the user proceeded from the first page of the membership renewal at which point they got a Error 404 Page or Error 403 Forbidden.

Also couldn't figure out why the Joomla Back end worked fine but the CiviCRM back end wouldn't work on just one PC. This PC of coarse had a shortcut for the back end that had the www. portion of the address which my CiviCRM install wouldn't deal with.

With all these details maybe somebody Else's search will turn up this post.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Problems with setting CiviCRM resource URL

This forum was archived on 2017-11-26.