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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • js errors in civicase
Pages: [1]

Author Topic: js errors in civicase  (Read 2847 times)

creea1

  • Guest
js errors in civicase
February 13, 2009, 02:54:31 am
I am testing civicrm2.2beta2 on with drupal6. I get five js errors on the case summary screen. I cannot use the calendar control (I click on it but nothing happens)  also none of the case features seem to work properly, I cannot edit the case role, or search for activities, ( I click but nothing happens). See the attached screen shot for the js errors.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: js errors in civicase
February 13, 2009, 03:39:10 am
Can you clear your browser cache and check again.

Kurund
Found this reply helpful? Support CiviCRM

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: js errors in civicase
February 13, 2009, 11:55:21 am
Seems like the jQuery scripts aren't loading properly (due to first error ??). If clearing cache doesn't work, I'd try loading some of the script URL's directly in your browser (i.e. the <script .../>'s in the HEAD of the document which you can see when u do view source on the page).
Protect your investment in CiviCRM by  becoming a Member!

creea1

  • Guest
Re: js errors in civicase
February 13, 2009, 02:01:56 pm
Cleared cache - with no change
I should have noted that these error also exist on other computers on my network, including linux/firefox win/firefox, win/ie

I think I have found the source of the missing config directory,  in civicrm.config.php line 69

Quote
        if ( strpos( $currentDir, 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'modules' ) !== false ) {
            // seems like this is in drupal5 dir location
            $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';

The "all" needs to be a wildcard, I am using the default directory, if I change "all" to "default", the calendar widget works. However the directory name under "sites" could be anything.

Unfortunately, it has not helped the js errors in the case summary .

creea1

  • Guest
Re: js errors in civicase
February 13, 2009, 04:46:31 pm
The call to the cj function is coming from
drupal6/sites/default/modules/civicrm/templates/CRM/Case/Form/caseview.tpl  which has quiet a lot on inline javascript.

I have  run grep -iR "function cj" /var/www/drupal6/sites/default/* and not found anywhere that a function cj is defined (if that is what the problem is)

Is this the best forum, or would the civicase forum be better?

Many thanks for any help that can be offered, as this is stopping any further testing of the new civicase functions.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: js errors in civicase
February 13, 2009, 06:10:10 pm
1. I see the following in my Manage Case page source:
Code: [Select]
<script type="text/javascript">var cj = jQuery.noConflict(); $ = cj;</script>

This is added by an included template:
templates/CRM/common/jquery.tpl

2. Are you able to load the jquery scripts in the browser for your site (as they are referenced in the page source)?

Example from my localhost:
<script type="text/javascript" src="/dgg/drupal6t/sites/all/modules/civicrm/packages/jquery/jquery.js"></script>

These scripts are running ok on quite a few machines, so something is different on your site / configuration ??
Protect your investment in CiviCRM by  becoming a Member!

creea1

  • Guest
Re: js errors in civicase
February 14, 2009, 02:16:12 am
None of the includes in templates/CRM/common/jquery.tpl were present in the case summary source. jquery.tpl is an include in  templates/CRM/common/drupal.tpl in the lines
Quote
{include file="CRM/common/jquery.tpl"}
{include file="CRM/common/dojo.tpl"}
I changed these lines  and checked the case summary which showed a big red error that it could not find the includes, then I put the above lines back to original state, and the jquery just started working fine.  Guess it was some sort of caching problem. Anyway, thanks for you help with this.   

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: js errors in civicase
February 15, 2009, 05:29:06 pm
Hi,

I was getting a bunch of js errors on a test install that I had copied from another install (to test the upgrade). I hadn't updated the directory path & url (Home › CiviCRM › Administer CiviCRM › Global Settings >- Update Directory Path and URL). Fixing this fixed it
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • js errors in civicase

This forum was archived on 2017-11-26.