Sterc / mediamanager

Enterprise grade media management in MODX
https://www.sterc.com/modx/extras/media-manager
7 stars 7 forks source link

Conflict with ImagePlus #66

Open Mark-H opened 1 year ago

Mark-H commented 1 year ago

Trying to render the media manager page fails with the following JS trace:

Uncaught TypeError: $(...).select2 is not a function
    setFilters https://development.local/3.x/assets/components/mediamanager/js/mgr/mediamanager-files.js?mv=310dev:502
    init https://development.local/3.x/assets/components/mediamanager/js/mgr/mediamanager-files.js?mv=310dev:143
    <anonymous> https://development.local/3.x/assets/components/mediamanager/js/mgr/mediamanager-files.js?mv=310dev:1790
    e https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    t https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    setTimeout handler*$jqIP</Deferred/then/c/< https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    r https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    fireWith https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    fire https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    r https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    fireWith https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    ready https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    ue https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    jqIP https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    jqIP https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6
    <anonymous> https://development.local/3.x/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.9.3&mv=310dev:6

Disabling the ImagePlus plugin allows the page to render.

Perhaps there's a way to resolve the conflict - using jQuery's noConflict mode?

MediaManager 3.0.3, ImagePlus 2.9.3, MODX 3.1.0-dev.

Mark-H commented 1 year ago

Related: #49