Tags icon indicating copy to clipboard operation
Tags copied to clipboard

jQuery conflict with SiteAttention

Open DrewNull opened this issue 7 years ago • 4 comments

Hi, I am attempting to get Geta.Tags 4 and SiteAttention 5 working in the same Episerver site.

Unfortunately, both of these two add-ons include different versions of jQuery as a client resources dependency. And the versions are conflicting with each other.

Here is what happens:

  1. Geta.Tags adds jQuery 2.1.0
  2. Geta.Tags adds jQuery UI
  3. SiteAttention adds jQuery 1.4.4, overwriting jQuery 2.1.0
  4. Geta.Tags adds tag-it, which required jQuery 2.1.0 w/ jQuery UI
  5. tag-it breaks because its version of jQuery was replaced

Screenshot of what is happening:

image

Is there any way to resolve this conflict?

DrewNull avatar Aug 22 '19 05:08 DrewNull

@DrewNull we haven't tested with another jQuery version. You could try to unzip the file in the _protectedModules folder and see what happens if you reference 1.4.4. However, it's just a short term solution. I don't think we will downgrade jQuery in the package itself and honestly not sure if there is a solution in Episerver to support multiple jQuery versions.

patkleef avatar Sep 02 '19 07:09 patkleef

Pat, I got around the collision by unzipping the module file, bundling the contents into a single file--jQuery, tag-it, and the custom JS--and using jQuery.noConflict() in case jQuery gets loaded by another add-on first.

DrewNull avatar Sep 03 '19 13:09 DrewNull

Great, however, I understand it's not the best solution for you for the long term. I can spend a bit more time on this later.

patkleef avatar Sep 04 '19 07:09 patkleef

@patkleef Did you get around to look at this? We have the same problem. I guess I will fix it for now with the same method as DrewNull, but the optimal fix is ofc in this repository :)

Sebbe avatar May 10 '21 09:05 Sebbe