Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-34432

AJS prefix missing in JQuery call in user mention JS file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Low Low
    • 5.5
    • 5.4.4
    • None

      The call to $.ajax should be AJS.$.ajax in the file tinyMce-autocomplete-settings-mentions.js of the Confluence Mentions plugin.

                  if (url) {
                      xhr = $.ajax({
                          type: "GET",
                          url: url,
                          data: getParams(autoCompleteControl, val),
                          dataType: "json",
                          global: false,
                          timeout: 10000
                      });
      

      This may lead to a JS error when using mentions. The errors produced will look like:

      • Firefox: TypeError: $ is undefined
      • Chrome: Uncaught TypeError: Cannot read property 'ajax' of undefined
      • IE10: Unable to get property 'ajax' of undefined or null reference

      Workaround

      1. Go to the "Custom HTML" section of the Confluence Administration Console.
      2. Add the following text to the "At end of the HEAD" section:
        <script type="text/javascript">
        var $ = jQuery;
        </script>
        

            shaffenden Steve Haffenden (Inactive)
            aconde Alejandro Conde Carrillo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: