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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Drupal/4.5: CRM.config.resourceBase is Undefined
Pages: [1] 2

Author Topic: Drupal/4.5: CRM.config.resourceBase is Undefined  (Read 2706 times)

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Drupal/4.5: CRM.config.resourceBase is Undefined
September 19, 2014, 08:42:28 am
*UPDATE*
It seems to be working properly now. I attempted several of the suggestions in this thread and all has been well so far. I'm not sure exactly what fixed it though.

My install is giving me CRM.config.resourceBase as undefined (at least that is what I believe). This started at 4.5.9. It results in the menu item arrow graphic not showing, as well as several other problems with jquery (pretty much anything in packages/.

for example, the url to the arrow.png is the following:
https://mysite/civicrm/undefinedpackages/jquery/css/images/arrow.png

I see that the file l10n-en_US.js defines the the resource base, however, I don't see it ever being called.

I also get this warning: Warning: CRM.url called before initialization

I can fix the problem if i define CRM.config.resourceBase = "\/sites\/all\/modules\/civicrm\/";
in the crm.ajax.js file.

Any idea what would be causing this?
« Last Edit: September 29, 2014, 11:37:55 am by lee.gooding »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 19, 2014, 10:41:26 am
Search your page source for /dynamic/l10n and you should see it in a script tag somewhere. Click on that link and make sure it works.
Try asking your question on the new CiviCRM help site.

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 19, 2014, 10:53:59 am
It wasn't finding the file. I thought I was able to fix it, but really have NO clue why it worked temporarily. My guess is that my path was somehow conflicting with something else in the code...

Under the Resources URL...
I originally had it set to: https://mysite/sites/mysite/files/

I cleared the image upload dir, saved, and let it fill it with the default: https://mysite/sites/all/files/civicrm/persist/contribute/
I then changed it to https://mysite/sites/mysite/files/civicrm/persist/contribute/

I cleared the caches and it magically finds the file.


**UPDATE**
I went and changed my word replacements. When I saved the word replacements it can no longer find the file again. This is really annoying.


« Last Edit: September 19, 2014, 11:11:28 am by lee.gooding »

pmoz

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.0, 4.5.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.68
  • PHP version: 5.4.9
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 19, 2014, 11:33:43 am
Lee,
Are you on a windows machine?

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 22, 2014, 06:12:47 am
My host is linux based running apache2.

I see that I am having similar (if not the same) issue as the following threads:
http://forum.civicrm.org/index.php/topic,34218.0/topicseen.html
http://forum.civicrm.org/index.php/topic,34211.0.html
« Last Edit: September 22, 2014, 06:19:18 am by lee.gooding »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 22, 2014, 06:17:43 am
Can you make sure your resource directory matches your resource url (there are twin settings pages under Admin -> System Settings "Directories" and Resource URLs - you should check both screens and make sure the paths match).
Try asking your question on the new CiviCRM help site.

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 22, 2014, 06:28:52 am
I'm not seeing where the directories match under both screens... It isn't clear.

However, the image image upload URL and images dir are both set properly.

Resources URL:
CiviCRM Resource URL: https://mysite/sites/all/modules/civicrm
CiviCRM Upload URL: https://mysite/sites/mysite/files/civicrm/persist/contribute/

Directories:
Images: /var/aegir/platforms/drupal-7.31/sites/mysite/files/civicrm/persist/contribute/
Temporary Files: /var/aegir/platforms/drupal-7.31/sites/mysite/files/civicrm/upload/

Just a thought... If the directories have to be the same, then the path should be set from only one of the settings. It doesn't make sense to have it set in two different locations. :)

Quote from: Coleman Watts on September 22, 2014, 06:17:43 am
Can you make sure your resource directory matches your resource url (there are twin settings pages under Admin -> System Settings "Directories" and Resource URLs - you should check both screens and make sure the paths match).

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 22, 2014, 07:00:42 am
I had a very different issue on upgrade from 4.4 to 4.5, but with the same root cause. The upper-left quick search box and edit-in-place for contacts would spin forever (but throw a JS error in the console).

After upgrade, the Image Upload URL was set to https://[domain]/sites/default/files/civicrm/persist/contribute/. Like OP, I also use Aegir (specifically the Omega8cc BOA stack). In Aegir there is no such thing as a 'default' site. Once I changed the Image Upload URL back to https://[domain]/sites/[domain]/files/civicrm/persist/contribute/, no more errors.

For future people searching the web for similar issues: The quickest way to determine if this is your problem is to visit the CiviCRM dashboard and check the browser console for a 404 error on arrow.png. You will notice that the URL to the png file starts with https://[domain]/undefinedpackages/. Or try to use an ajax-powered feature and receive a JS error like "'back' is undefined".

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
September 22, 2014, 02:58:02 pm
Quote
I went and changed my word replacements. When I saved the word replacements it can no longer find the file again. This is really annoying.
FWIW the word replacements seems like a bit of a red herring.
it appears that when you visit civicrm/admin/options/wordreplacements?reset=1 the ?xxxxxx bit at the end of sites/example.org/files/civicrm/dynamic/l10n-en_GB.js?ncbotm" is always regenerated - I'm guessing a cache is cleared on every page load there or something.
once you navigate away from that page, all is fine again.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

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: Drupal/4.5: CRM.config.resourceBase is Undefined
October 07, 2014, 12:19:56 pm
I'm having this problem in Joomla 2.5.27 after a recent upgrade to CiviCRM4.5

Clearing the Resource URL for the image directory, letting it default, then resetting did not work.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
October 07, 2014, 01:11:12 pm
Due to the large number of posts from people suffering major javascript failures due to incorrect url settings, we are switching core javascript to no longer rely on those settings on 4.5.1 (scheduled for this week) - this should make people's upgrade experiences smoother, although getting those settings correct is still a good idea.
Try asking your question on the new CiviCRM help site.

Lazlo Bakk

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
    • Okoshonlapok
  • CiviCRM version: 4.5.5
  • CMS version: Joomla, Drupal
  • MySQL version: 5.5
  • PHP version: 4.4
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
November 05, 2014, 12:25:07 pm
Is there a solution for this problem? I've set all of the paths, hunted down all old paths in the SQL dump file, cleared all cache, but the javascript failures are preventing the usage of the CRM.
Fresh migration, Joomla + CiviCRM 4.5.1

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
November 05, 2014, 03:26:56 pm
4.5.3 is out now.   You should upgrade to that and see if your problem goes away.

Lazlo Bakk

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
    • Okoshonlapok
  • CiviCRM version: 4.5.5
  • CMS version: Joomla, Drupal
  • MySQL version: 5.5
  • PHP version: 4.4
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
November 07, 2014, 10:29:04 pm
I've updated the files and the database, cleared the cache, checked the paths, and now I've a 4.5.3 Civicrm that still struggles with JavaScript, just like the 4.5.1.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Drupal/4.5: CRM.config.resourceBase is Undefined
November 08, 2014, 04:42:09 am
When you "view source" on the page and search the html for "l10n-js" what do you see? When you click on that resource, what happens?
Try asking your question on the new CiviCRM help site.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Drupal/4.5: CRM.config.resourceBase is Undefined

This forum was archived on 2017-11-26.