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

Details

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

    Description

      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>
        

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: