bug #9463
openUniversalViewer causes jQuery version conflict and breaks maps
0%
Description
When taxon pages are configured tab-less the image-viwer (Universalviewer - UV) is shown together with maps on the same page.
The UV loads jQuery version 3.* which is brought with /uv/lib/offline.js this version becomes global and conflicts with the Drual jQuery version of 1.4.*
locally*
edit-production
Severity:
Only portal with images (see #8912) which are using the universal viewer + tables taxon pages (dataportals-drush-vget cdm_dataportal_taxonpage_tabs
) are affected by this bug. At current these are:
- http://caryophyllales.org/
- http://caryophyllales.org/caryophyllales_spp/
- http://caryophyllales.org/amaranthaceae/
- http://caryophyllales.org/nepenthaceae/
- http://caryophyllales.org/plumbaginaceae/
- http://caryophyllales.org/caryophyllaceae/
- http://caryophyllales.org/polygonaceae/
- http://caryophyllales.org/aizoaceae/
- http://caryophyllales.org/wbdemo/
Relevant literature:
- https://stackoverflow.com/questions/1566595/can-i-use-multiple-versions-of-jquery-on-the-same-page
- https://api.jquery.com/jQuery.noConflict/#jQuery-noConflict-removeAll
- requirejs and jQuery
Debugging:
Universaviewer code is minified, for debugging, build the universalviewer project with the --dev
option:
grunt build --dev
You also can temporarily replace the folder modules/cdm_dataportal/js/universalviewer/uv
by a symlink to the univeralviewer
projekt, so "instant deployment" of the uv code to the dataportal project.
See also modules/cdm_dataportal/js/universalviewer/UPDATE.md
for some more information.
Related issues