Pages (2): 1 2   
Member
Member
Ralf   11-04-2021, 08:52
#1

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

Member
Member
Ralf   11-04-2021, 09:24
#2

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

Administrator
Administrator
acrylian   11-04-2021, 09:26
#3

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

Member
Member
Ralf   11-04-2021, 09:39
#4

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

But I have no idea how to fix this.

Administrator
Administrator
acrylian   11-04-2021, 09:42
#5

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

Member
Member
Ralf   11-04-2021, 10:02
#6

makeAlbumCurrent()
will not load the page.

Could you point me in the right direction?

Administrator
Administrator
acrylian   11-04-2021, 10:13
#7

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

Member
Member
Ralf   11-04-2021, 10:36
#8

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

Administrator
Administrator
acrylian   11-04-2021, 10:44
#9

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.

Member
Member
Ralf   11-04-2021, 10:52
#10

No Problem :-)

Administrator
Administrator
fretzl   11-04-2021, 11:38
#11

Have you tried the absolute URL to exclude leaflet.js?
https://www.ralf-kerkhoff.de/zp-core/zp-extensions/openstreetmap/leaflet.js

Member
Member
Ralf   11-04-2021, 12:00
#12

Yes,
but that doesnt fix the problem.

Administrator
Administrator
acrylian   11-04-2021, 12:35
#13

Probably the author @bic can help better here.

Administrator
Administrator
fretzl   11-04-2021, 13:34
#14

Just tried your setup with the zenpage theme, a dynamic album and the tidy-assets plugin enabled. Everything works like it should.

Member
Member
Ralf   11-04-2021, 13:44
#15

It seems, that it is the album.
I have created the album this way:
https://www.vincentbourganel.fr/news/map-of-geo-localized-pictures/

If I choose another dynamic album the map is displayed fine.

Administrator
Administrator
acrylian   11-04-2021, 13:47
#16

Then your album respectively the images perhaps don't not have valid geodata available. In 1.5.8 then the map would not show.

Member
Member
Ralf   11-04-2021, 13:56
#17

mhh, without the tidy plugin activated the map displays fine.
So my guess is that the "Word Criteria" which is * makes the problem.

Administrator
Administrator
acrylian   11-04-2021, 14:28
#18

Check perhaps if the album created has images at all.

Member
Member
Ralf   11-04-2021, 14:42
#19

it has about 2500 images.

Administrator
Administrator
fretzl   12-04-2021, 08:28
#20

Did you perhaps put the code to call the OpenStreetMap in the page codeblock 1 ?
If so, remove it from codeblock 1 and copy it to codeblock 3
The multiverse theme has printCodeblock(1) in the section and since `printOpenStreetMap()` also prints a element you could be in trouble because that is not allowed in the `section. If you look atpages.phpin the multiverse theme you'll see thatprintCodeblock(3)` is called after the page content.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.