0

Can someone offer me some insight as to the possible cause of the Actions drop-down not working?

Here is my setup:

  • CiviCRM 5.13.3
  • Drupal 7.67
  • PHP 7.2.16
  • Bootstrap subtheme set to use JQuery 3.1

When I execute a search from the advanced search form, I get the following JS error:

TypeError: f is undefined
    mysite.org/misc/jquery.ba-bbq.js:19:115
Warn: could not find module util

When select contacts from search results, I get the following errors:

TypeError: $(...).val(...) is undefined  
    mysite.org/sites/default/files/civicrm/civi_extensions/org.civicrm.shoreditch/js/main-menu.js:66:41
    Ember 2 (errors)
        isQuickSearchOnGoing
        removeCustomClassOnOutsideClick
    jQuery 2 (errors)
        dispatch
        handle

When I select an item from the "Actions" dropdown, I get the following errors:

TypeError: $(...).val(...) is undefined
    mysite.org/sites/default/files/civicrm/civi_extensions/org.civicrm.shoreditch/js/main-menu.js:66:41
Ember 2 (errors)
    isQuickSearchOnGoing
    removeCustomClassOnOutsideClick
jQuery 8 (errors)
    dispatch
    handle
    trigger
    trigger
    each
    each
    trigger
    b
<anonymous> Ember
jQuery 7 (errors)
    dispatch
    handle
    trigger
    trigger
    each
    each
    trigger
Ember 5 (errors)
    triggerChange
    onSelect
    selectHighlighted
    init
    bind
jQuery 2 (errors)
    dispatch
    handle

I am able to execute actions options from a contact's individual record, but not from any search results. Changing Bootstrap's settings to use a lower version of JQuery has no effect. Disabling the Bootstrap sub theme and base theme has no effect. It happens in Firefox and Chrome.

1

Can you try below patch on shoreditch extension to see if it fixes your problem?

diff --git a/js/main-menu.js b/js/main-menu.js
index c4bd2576..c87ba81d 100644
--- a/js/main-menu.js
+++ b/js/main-menu.js
@@ -63,9 +63,12 @@
    * @return {boolean}
    */
   function isQuickSearchOnGoing () {
-    var searchValue = $('#sort_name_navigation').val() || '';
-
-    return !!searchValue.trim();
+    if ($('#sort_name_navigation') && $('#sort_name_navigation').val()) {
+      return !!$('#sort_name_navigation').val().trim();
+    }
+    else {
+      return false;
+    }
   }

   /**

Cheers

Pradeep

  • Thank you so much for the patch! That did the trick. I was trying my hand at it this morning and hadn't gotten it to work yet. – Tish May 15 at 12:41
  • Can you please mark this post as answered than? – Pradeep Nayak May 15 at 12:59
  • I have had the same problem appear on upgrade to 5.13.5 (no Action from the Action dropdown). The problem disappears if I disable Shoreditch. However, the patch above seems incompatible with the current/new(?) code in Shoreditch's main-menu.js, which is now simply: > /** > * Checks if the quick search field currently has any value > * > * @return {boolean} > */ > function isQuickSearchOnGoing () { > return !!$('#sort_name_navigation').val().trim(); > } – Bryan Jun 1 at 3:08
  • Problem vanished with today's update to new versions of Flexmailer & Mosaico. – Bryan Jun 2 at 1:25
  • I spoke too soon. The problem is still there but only affects the Contacts Action drop down, not other lists. – Bryan Jun 4 at 1:54
0

Having a similar problem. Playing with different Civi admin themes and shoreditch enabled and disabled. At one point a "Go" button showed up next to the Actions drop down list. The button triggered the selected action. But this button does not show up consistently with any other theme and the combination of theme and Civi css on/off options did not display correctly.

enter image description here

0

Upgrading Shoreditch/Bootstrap to Alpha32 seems to solve the problem (thus far). Curious that Shoreditch was not selected as the theme but seems to have been interfering nonetheless. Still not sure about that Go button. Any ideas on where that comes from?

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.