Uploaded image for project: 'Magnolia Soft Locking Module'
  1. Magnolia Soft Locking Module
  2. MGNLSLOCK-6

Introduction of jQuery.noConflict() in javascript.js can break author instances already using jQuery and its $ alias.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.1
    • 1.0
    • None

    Description

      As received via email by Kees de Koning from MediaCatalyst

      I just upgraded to 4.4.1, but from a quick look it seems that you added a JQuery.noConflict() to javascript.js;
      This seems very strange to me from a CMS point of view; in our case, it breaks the site completely in author mode, as we have
      $ all over the place (and Jquery is the only lib we use, so we don't mind).
      Do I really start replacing all our 3000 occurences of $ with JQuery, or are you planning on changing this?


      jQuery.noConflict() slipped into our softLocking.js (and thus into javascript.js) probably due to some thoughtless code copy&paste. However we should carefully test the author without it as Magnolia too defines the $ as an alias to document.getElementById()
      An alternative to replacing all occurrences of $ could be wrapping code using jQuery like this

        jQuery(document).ready(function($) {
          // Code that uses jQuery's $ can follow here.
        });
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgrilli Federico Grilli
              fgrilli Federico Grilli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD