Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

jQuery plugin in Shell.UI, ui.daterange should wrap its codeblock to use its own EpiJQuery

Found in

EPiServer.CMS.UI 7.6

Created

Jun 24, 2014

Updated

Aug 22, 2014

Area

Falcon/CMS/Edit UI

State

Closed, Fixed


Steps to reproduce

the jQuery plugin in ui.daterange.js should wrap its code block inside

 

(function ($) {

    // code of plugin here

})(epiJQuery);

 

so it will use epiJQuery (which is 1.3.2) correctly.

 

Otherwise, it will bind to the $ object, that $ object can be another instance of jQuery (can be in different version, which is registered by a 3rd party module to EditView)

==> it mights lead to unexpected error in EditView and gadgets will stop working.

 

 

This is also true for GadgetWrapper,js

 

Repro steps In the wild:

  1. Setup an alloy-site
  2. Install the ContentCollaboration AddOn
  3. In the dashboard, add a gadget with settings(for instance notes)
  4. Try changing some setting for the gadget, click ok

 

Expected:

Updated settings

 

Actual result:

A Controller exception

 

 

Easier repro steps for dev:

  1. Add a dummy jquery jQuery = $ = { homebrew: true }; and have it loaded by the bootstrapper
  2. In the dashboard, add a gadget with settings(for instance notes)
  3. Try changing some setting for the gadget, click ok