3

I upgraded from 4.5.8 to 4.6 and wanted to start exploring CiviCase. I think I've poked at it a little bit in the past without this problem, but may be wrong. After enabling the component, I go to Administer->CiviCase->Case Types and create a new type or edit one of the existing types. On the edit screen, the "Add role" and "Add activity" boxes don't do anything when I click on them.

I'm running Joomla.

This works on the joomla demo site. I notice in the source code there, that early on jquery is loaded:

<link rel="stylesheet" href="/administrator/components/com_civicrm/civicrm/css/angular-crmCaseType.css?r=ztjZx" type="text/css" />
<script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
<script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
<script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>
<script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/administrator/templates/isis/js/template.js?09064904c3098f5b2b2e8bc1eb2d9972" type="text/javascript"></script>
<script type="text/javascript">
var CRM = {"config":{"isFrontend":false},"crmMailing":{"civiMails":[],"campaignEnabled":true,"groupNames":[{"id":"1","title":"Case ...and a lot more raw scripting

In my installation, jquery is never loaded. It loads:

<link rel="stylesheet" href="/administrator/components/com_civicrm/civicrm/css/angular-crmCaseType.css?r=bLDq0" type="text/css" />
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/modal.js" type="text/javascript"></script>
<script type="text/javascript">

    window.addEvent('domready', function() {

        SqueezeBox.initialize({});
        SqueezeBox.assign($$('a.modal'), {
            parse: 'rel'
        });
    });
</script>
<script type="text/javascript">
var CRM = {"config":{"isFrontend":false},"crmMailing":{"civiMails":[],"campaignEnabled":false,"groupNames": ... and a bunch of raw script.
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery-ui/jquery-ui.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/lodash-compat/lodash.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.mousewheel.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.tableHeader.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.textarearesizer.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.form.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.timeentry.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.blockUI.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/DataTables/media/js/jquery.dataTables.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery-validation/dist/jquery.validate.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.ui.datepicker.validation.pack.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/Common.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/crm.ajax.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.menu.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.jeditable.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.notify.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/jquery/jquery.crmeditable.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/crm.optionEdit.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/crm.joomla.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/?option=com_civicrm&amp;task=civicrm/ajax/l10n-js/en_US&amp;r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular/angular.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-route/angular-route.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-file-upload/angular-file-upload.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmApp.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmAttachment.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmAutosave.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmResource/all.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crm-ui.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/ckeditor/ckeditor.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crm-util.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-jquery-dialog-service/dialog-service.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-ui-utils/ui-utils.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-ui-sortable/sortable.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-unsavedChanges/dist/unsavedChanges.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailing.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailing/directives.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailing/services.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailingAB.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailingAB/directives.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailingAB/services.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/d3/d3.min.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmD3.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmCaseType.js?r=Fv3Zh">
</script>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/noconflict.js?r=Fv3Zh">
</script>

<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=tc945">
</script>

<!--[if IE 7]>
<link href="templates/bluestork/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--[if gte IE 8]>
<link href="templates/bluestork/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>

Note: the last instance of the jquery.min.js script is the one I added, which seems to fix the problem.

At http://forum.civicrm.org/index.php/topic,36265 there's discussion of jquery being moved in this version...is this related?

In my browser console I see:

TypeError: undefined is not a function
at b     (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:6971)
at O.initContainerWidth (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:7155)
at O.initContainer (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:12997)
at O.init (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:1:19472)
at HTMLInputElement.<anonymous> (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:31011)
at Function.m.extend.each (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=bLDq0:2:2975)
at m.fn.m.each (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=bLDq0:2:835)
at a.fn.select2 (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:30756)
at crmCaseType.directive.link (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/js/angular-crmCaseType.js?r=bLDq0:104:18)
at $ (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/angular/angular.min.js?r=bLDq0:70:197) <span crm-add-name="" crm-options="relationshipTypeNames" crm-var="newRole" crm-on-add="addRole(caseType.definition.caseRoles, newRole)">

angular.js:11655 TypeError: undefined is not a function
at b (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:6971)
at O.initContainerWidth (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:7155)
at O.initContainer (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:12997)
at O.init (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:1:19472)
at HTMLInputElement.<anonymous> (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:31011)
at Function.m.extend.each (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=bLDq0:2:2975)
at m.fn.m.each (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=bLDq0:2:835)
at a.fn.select2 (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:30756)
at crmCaseType.directive.link (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/js/angular-crmCaseType.js?r=bLDq0:104:18)
at $ (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/angular/angular.min.js?r=bLDq0:70:197) <span crm-add-name="" crm-options="activityTypeNames" crm-var="newActivity" crm-on-add="addActivityType(newActivity)">

angular.js:11655 TypeError: undefined is not a function
at b (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:6971)
at O.initContainerWidth (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:7155)
at O.initContainer (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:12997)
at O.init (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:1:19472)
at HTMLInputElement.<anonymous> (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:31011)
at Function.m.extend.each (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=bLDq0:2:2975)
at m.fn.m.each (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=bLDq0:2:835)
at a.fn.select2 (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=bLDq0:2:30756)
at crmCaseType.directive.link (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/js/angular-crmCaseType.js?r=bLDq0:104:18)
at $ (https://deepgreenresistance.org/administrator/components/com_civicrm/civicrm/bower_components/angular/angular.min.js?r=bLDq0:70:197) <span crm-add-name="" crm-options="activityTypeNames" crm-var="newActivity" crm-on-add="addActivity(activitySet, newActivity)">

24angular.js:11655 TypeError: undefined is not a function
at b (select2.min.js?r=bLDq0:2)
at O.initContainerWidth (select2.min.js?r=bLDq0:2)
at O.initContainer (select2.min.js?r=bLDq0:2)
at O.init (select2.min.js?r=bLDq0:1)
at HTMLSelectElement.<anonymous> (select2.min.js?r=bLDq0:2)
at Function.m.extend.each (jquery.js:384)
at m.fn.m.each (jquery.js:136)
at a.fn.select2 (select2.min.js?r=bLDq0:2)
at ui-utils.min.js?r=bLDq0:7
at angular.js:16299angular.js:11655 (anonymous function)angular.js:8596 $getangular.js:16302 (anonymous function)angular.js:4924 eangular.js:5312 (anonymous function)
  • did anyone find an answer to this? I have the same problem. When I try to open Administer->CiviCase->Case Types, I just get a blank screen with a reduced CiviCRM menu. Lots of JavaScript errors as decribed by Norris above. One thing I don't understand is why the huge statement which starts var CRM = {"config":{"isFrontend":false},"crmMailing":{"civiMails".... appears there. Why is this relevant when trying to set up Case Types? Thanks. – Jern Jul 25 '15 at 15:39
  • No propery answer for me - I've left it with the hack of adding the extra load of jquery.min.js – Norris Jul 25 '15 at 19:18
2

If CiviCRM's jQuery never loaded at all, you'd be having a lot more problems than just that one screen. It's hard to tell because in your second snippet, you cut it off just when things were getting interesting. The line starting with var CRM = ... is the start of CiviCRM's scripts, and jQuery and other plugins should be just a few lines down from it.

So (guessing from incomplete information) I'd say that's not the problem, and you have some other javascript error on your site. Have you looked in your console for errors?

Have you gone through the steps at Troubleshooting popups, autocompletes, or other javascript problems?

  • Thanks Coleman. I tried a fresh install of Joomla 2.5.8 with Civi 4.6.0 and had the same problem. I edited the /administrator/templates/bluestork/index.php to put this line in immediately after <head> : – Norris Apr 15 '15 at 23:12
  • I tried a fresh install of Joomla 2.5.8 with Civi 4.6.0 and had the same problem. So I edited /administrator/templates/bluestork/index.php to put this immediately after <head>: <script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=tc945"> </script> Placing that as the first script, as well as being loaded as the first script after the huge block of var CRM = {"config":{"isFrontend":false}, ... allows the Case edit screen dropdowns to work. I haven't tested enough yet to see if it causes other problems. – Norris Apr 15 '15 at 23:22
  • Could you update the original post to show a little more of the page source? Would like to see the entire list of scripts that are loading. – Coleman Apr 18 '15 at 15:30
  • Updated, thanks! It now shows everything from <head> except css and the huge block of "var CRM=" stuff. Note: the last instance of the jquery.min.js script is the one I added, which seems to fix the problem. – Norris Apr 19 '15 at 20:28
  • Looks like jQuery is indeed there... (first script after var CRM...) did you click on that link in the page source to see if it exists? – Coleman Apr 19 '15 at 22:11
0

Do you have K2 installed? If so, there is an incompatibility between K2 2.6.9 and CiviCRM, which caused JavaScript errors. If you do have K2, then you need to install a patch. See my other related post here.

  • Thanks Jem, but we don't have K2 installed. – Norris Jul 27 '15 at 16:53
  • It was a long shot. Good luck with it. – Jern Jul 29 '15 at 19:35

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.