Answers.Body: <p>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 <code>var CRM = ...</code> is the <em>start</em> of CiviCRM's scripts, and jQuery and other plugins should be just a few lines down from it.</p>
  
  <p>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?</p>
  
  <p>Have you gone through the steps at <a href="http://forum.civicrm.org/index.php/topic,35850.0.html" rel="nofollow">Troubleshooting popups, autocompletes, or other javascript problems</a>?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T23:12:58.017Z
Answers.Text: 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> :
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T23:22:35.360Z
Answers.Text: 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.
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-18T15:30:59.623Z
Answers.Text: 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.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-19T20:28:56.697Z
Answers.Text: 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.
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-19T22:11:11.190Z
Answers.Text: 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?
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-20T23:40:37.913Z
Answers.Text: Yes, it exists...I used the same link to load it again at the end.  (Although the random string after .js is different since I hard coded it.)
  
  Something about the order of loading fixes the problem, I guess?
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-21T14:48:18.433Z
Answers.Text: Might be something to do with the noConflict mode. Is there some script on your page (not in CIvi's header block of scripts) that is trying to access jQuery as `jQuery` or `$` rather than our scoped `CRM.$`?
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-22T18:49:13.607Z
Answers.Text: How about this?:
  
  `<script>
  (function ($) {
    $('#crm-create-new-list > div > ul').menu();
    $('#crm-create-new-link').click(function (event) {
      $('#crm-create-new-list').toggle();
      $('body:not(#crm-create-new-list)').click(function () {
        $('#crm-create-new-list').hide();
      });
      event.stopPropagation();
      return false;
    });
  })(CRM.$);
  </script>`
  
  or
  
  `<script type="text/javascript">
  
    window.addEvent('domready', function() {
  
     SqueezeBox.initialize({});
     SqueezeBox.assign($$('a.modal'), {
      parse: 'rel'
     });
    });
    </script>`
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-23T02:35:54.237Z
Answers.Text: Both of those look fine. The first is using `CRM.$` which is the standard way to get jQuery in Civi, and the 2nd is a wp thing.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-30T23:12:31.323Z
Answers.Text: I'm stumped...don't see any other potentially interfering scripts.  I'm content with adding the extra load of jquery.min.js, but also happy to try to troubleshoot further if you have any more suggestions.  Or I could probably give you access if you want to check on things.
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-11T13:10:52.393Z
Answers.LastActivityDate: 2015-04-11T13:10:52.393Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>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 <a href="https://civicrm.stackexchange.com/questions/4197/ajax-problem-in-civicase-administer-case-types/4205#4205">here</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-27T16:53:28.657Z
Answers.Text: Thanks Jem, but we don't have K2 installed.
Answers.UserDisplayName: Norris
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T19:35:46.260Z
Answers.Text: It was a long shot. Good luck with it.
Answers.UserDisplayName: Jern
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-27T05:35:32.857Z
Answers.LastActivityDate: 2015-07-27T05:35:32.857Z
Answers.LastEditDate: 2017-04-13T12:53:13.207Z
Answers.UserDisplayName: Jern
Body: <p>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.</p>
  
  <p>I'm running Joomla.</p>
  
  <p>This works on the joomla demo site.  I notice in the source code there, that early on jquery is loaded:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="/administrator/components/com_civicrm/civicrm/css/angular-crmCaseType.css?r=ztjZx" type="text/css" /&gt;
  &lt;script src="/media/jui/js/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/media/jui/js/bootstrap.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/administrator/templates/isis/js/template.js?09064904c3098f5b2b2e8bc1eb2d9972" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  var CRM = {"config":{"isFrontend":false},"crmMailing":{"civiMails":[],"campaignEnabled":true,"groupNames":[{"id":"1","title":"Case ...and a lot more raw scripting
  </code></pre>
  
  <p>In my installation, jquery is never loaded.  It loads:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="/administrator/components/com_civicrm/civicrm/css/angular-crmCaseType.css?r=bLDq0" type="text/css" /&gt;
  &lt;script src="/media/system/js/mootools-core.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/media/system/js/core.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/media/system/js/modal.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      window.addEvent('domready', function() {
  
          SqueezeBox.initialize({});
          SqueezeBox.assign($$('a.modal'), {
              parse: 'rel'
          });
      });
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  var CRM = {"config":{"isFrontend":false},"crmMailing":{"civiMails":[],"campaignEnabled":false,"groupNames": ... and a bunch of raw script.
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery-ui/jquery-ui.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/lodash-compat/lodash.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.mousewheel.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.tableHeader.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.textarearesizer.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.form.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.timeentry.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.blockUI.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/DataTables/media/js/jquery.dataTables.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery-validation/dist/jquery.validate.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.ui.datepicker.validation.pack.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/Common.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/crm.ajax.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.menu.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.jeditable.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/jquery/plugins/jquery.notify.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/jquery/jquery.crmeditable.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/crm.optionEdit.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/crm.joomla.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/?option=com_civicrm&amp;amp;task=civicrm/ajax/l10n-js/en_US&amp;amp;r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular/angular.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-route/angular-route.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-file-upload/angular-file-upload.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmApp.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmAttachment.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmAutosave.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmResource/all.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crm-ui.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/packages/ckeditor/ckeditor.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crm-util.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-jquery-dialog-service/dialog-service.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-ui-utils/ui-utils.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-ui-sortable/sortable.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/angular-unsavedChanges/dist/unsavedChanges.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailing.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailing/directives.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailing/services.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailingAB.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailingAB/directives.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmMailingAB/services.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/d3/d3.min.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmD3.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/angular-crmCaseType.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/noconflict.js?r=Fv3Zh"&gt;
  &lt;/script&gt;
  
  &lt;script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/bower_components/jquery/dist/jquery.min.js?r=tc945"&gt;
  &lt;/script&gt;
  
  &lt;!--[if IE 7]&gt;
  &lt;link href="templates/bluestork/css/ie7.css" rel="stylesheet" type="text/css" /&gt;
  &lt;![endif]--&gt;
  
  &lt;!--[if gte IE 8]&gt;
  &lt;link href="templates/bluestork/css/ie8.css" rel="stylesheet" type="text/css" /&gt;
  &lt;![endif]--&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p><strong>Note:</strong> the last instance of the jquery.min.js script is the one I added, which seems to fix the problem.</p>
  
  <p>At <a href="http://forum.civicrm.org/index.php/topic,36265" rel="nofollow">http://forum.civicrm.org/index.php/topic,36265</a> there's discussion of jquery being moved in this version...is this related?</p>
  
  <p>In my browser console I see:</p>
  
  <pre><code>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.&lt;anonymous&gt; (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) &lt;span crm-add-name="" crm-options="relationshipTypeNames" crm-var="newRole" crm-on-add="addRole(caseType.definition.caseRoles, newRole)"&gt;
  
  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.&lt;anonymous&gt; (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) &lt;span crm-add-name="" crm-options="activityTypeNames" crm-var="newActivity" crm-on-add="addActivityType(newActivity)"&gt;
  
  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.&lt;anonymous&gt; (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) &lt;span crm-add-name="" crm-options="activityTypeNames" crm-var="newActivity" crm-on-add="addActivity(activitySet, newActivity)"&gt;
  
  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.&lt;anonymous&gt; (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)
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-25T15:39:37.300Z
Comments.Text: 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.
Comments.UserDisplayName: Jern
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-25T19:18:58.760Z
Comments.Text: No propery answer for me - I've left it with the hack of adding the extra load of jquery.min.js
Comments.UserDisplayName: Norris
Tags: <civicase>
Title: How do I make dropdowns work on CiviCase edit case type?
ThreadText: # How do I make dropdowns work on CiviCase edit case type?
  
  (Asked by: username_0 on 2015-04-11)
  
  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)
  
  ```
  
  **Tags:** civicase
  
  > **Comments:**
  > **username_1**: 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 username_0 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.  
  > **username_0**: No propery answer for me - I've left it with the hack of adding the extra load of jquery.min.js  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-04-11. Score: 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](http://forum.civicrm.org/index.php/topic,35850.0.html)?
  
  > **Comments:**
  > **username_0**: Thanks username_2.  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> :  
  > **username_0**: 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.  
  > **username_2**: 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.  
  > **username_0**: 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.  
  > **username_2**: 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?  
  > **username_0**: Yes, it exists...I used the same link to load it again at the end.  (Although the random string after .js is different since I hard coded it.)  Something about the order of loading fixes the problem, I guess?  
  > **username_2**: Might be something to do with the noConflict mode. Is there some script on your page (not in CIvi's header block of scripts) that is trying to access jQuery as `jQuery` or `$` rather than our scoped `CRM.$`?  
  > **username_0**: How about this?:  `<script> (function ($) {   $('#crm-create-new-list > div > ul').menu();   $('#crm-create-new-link').click(function (event) {     $('#crm-create-new-list').toggle();     $('body:not(#crm-create-new-list)').click(function () {       $('#crm-create-new-list').hide();     });     event.stopPropagation();     return false;   }); })(CRM.$); </script>`  or  `<script type="text/javascript">    window.addEvent('domready', function() {     SqueezeBox.initialize({});    SqueezeBox.assign($$('a.modal'), {     parse: 'rel'    });   });   </script>`  
  > **username_2**: Both of those look fine. The first is using `CRM.$` which is the standard way to get jQuery in Civi, and the 2nd is a wp thing.  
  > **username_0**: I'm stumped...don't see any other potentially interfering scripts.  I'm content with adding the extra load of jquery.min.js, but also happy to try to troubleshoot further if you have any more suggestions.  Or I could probably give you access if you want to check on things.  
  
  ---
  
  ### Answer by username_1 on 2015-07-27. Score: 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](https://civicrm.stackexchange.com/questions/4197/ajax-problem-in-civicase-administer-case-types/4205#4205).
  
  > **Comments:**
  > **username_0**: Thanks Jem, but we don't have K2 installed.  
  > **username_1**: It was a long shot. Good luck with it.  
  
  ---
  
  