ZenphotoCMS Forum
Tidy Assets Plugin - JS exclusion - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: Tidy Assets Plugin - JS exclusion (/thread-13561.html)

Pages: 1 2 3


Tidy Assets Plugin - JS exclusion - Ralf - 11-04-2021

Hi,
I would like to exclude some js files and tried to add them to the 'Skip Elements' box.
Example:
zp-core/zp-extensions/openstreetmap/leaflet.js

But I cant get the leaflet.js excluded from beeing moved to the bottom of the page.

Not sure what exactly is the correct syntax for adding an js exclusion. Tried the full path like above or simply leaflet.js
But this does not work.

Any hints?
Ralf




Tidy Assets Plugin - JS exclusion - Ralf - 11-04-2021

To be a little more precise what is exactly the problem on my site:

I have created a page which shows all geotagged images on a map by using this code:

As soon as I enable the Tidy Assets plugin, the map will not be loaded.
What makes me wondering:
On the image page the map is displayed fine - even with the plugin enabled




Tidy Assets Plugin - JS exclusion - acrylian - 11-04-2021

Any JS errors perhaps? Btw, you either pass the album object or you make it current without passing it.




Tidy Assets Plugin - JS exclusion - Ralf - 11-04-2021

What I see in the console:
Uncaught ReferenceError: L is not defined

But I have no idea how to fix this.




Tidy Assets Plugin - JS exclusion - acrylian - 11-04-2021

Please remove all parameters when making the album current. That would be the normal album page usage.




Tidy Assets Plugin - JS exclusion - Ralf - 11-04-2021

makeAlbumCurrent()
will not load the page.

Could you point me in the right direction?




Tidy Assets Plugin - JS exclusion - acrylian - 11-04-2021

I was referring to the printOpenStreetMap() call. Either you pass an album object to it or you use the current album.




Tidy Assets Plugin - JS exclusion - Ralf - 11-04-2021

changed the code to:

which makes the map display fine. Until I enable the plugin. Then the uncaught refereneError is back and no map is displayed




Tidy Assets Plugin - JS exclusion - acrylian - 11-04-2021

Sorry, I really can't help with the plugin itself as I never used it. I mean it has a disclaimer that it may not work with every script.




Tidy Assets Plugin - JS exclusion - Ralf - 11-04-2021

No Problem :-)