Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery conflict with SiteAttention #94

Open
DrewNull opened this issue Aug 22, 2019 · 4 comments
Open

jQuery conflict with SiteAttention #94

DrewNull opened this issue Aug 22, 2019 · 4 comments
Assignees

Comments

@DrewNull
Copy link

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 patkleef self-assigned this Sep 2, 2019
@patkleef
Copy link
Contributor

patkleef commented Sep 2, 2019

@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
Copy link
Author

DrewNull commented Sep 3, 2019

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
Copy link
Contributor

patkleef commented Sep 4, 2019

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
Copy link

Sebbe commented May 10, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants