Geta / Tags

Geta Tags for EPiServer CMS
Apache License 2.0
20 stars 32 forks source link

jQuery conflict with SiteAttention #94

Open DrewNull opened 5 years ago

DrewNull commented 5 years ago

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?

patkleef commented 5 years ago

@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.

DrewNull commented 5 years ago

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.

patkleef commented 5 years ago

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.

Sebbe commented 3 years ago

@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 :)