Javascript library conflict may cause Page Editor issues


Description

The Sitecore Page Editor uses the Prototype.js library (http://www.prototypejs.org).  In solutions which leverage additional JavaScript libraries, the various libraries can encounter conflicts which lead to issues in the Page Editor, such as controls that are not properly loaded, inability to perform inline editing as appropriate, or JavaScript error messages.

This is a common issue when solutions load multiple JavaScript libraries.

Solution

To resolve the issue, consider the following option:

  1. If your solution already uses the Prototype.js library, change the following file to check whether the library is already loaded.
    \sitecore\shell\Controls\Lib\Prototype\prototype.js
  2. To do this, add the following statements at the start and end of the file:
    if (!Prototype) {
    < original contents of the file >
    }
  3. If your solution uses the jQuery library, please read this article for suggested workarounds: http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/.

If you still have issues after applying the suggestions above or if you have found a conflict with some other library, contact Sitecore Support.