The simpler media website CMS
Hi,
it looks like the nearly the same problem as back in 2021:
https://forum.zenphoto.org/discussion/1410768/tidy-assets-plugin-js-exclusion
I have created a dynamic album based on a search for longitude and latitude.
The alb file for the album has this content:
WORDS=*
THUMB=1
FIELDS=exifgpslatitude,exifgpslongitude
CONSTRAINTS=inalbums=0&inimages=1&unpublished=0
Without tidy asset plugin enabled the map loads fine with all pictures which have gps data.
With the plugin enabled, the album loads forever without displaying anything.
https://www.ralf-kerkhoff.de/places/Geocode/
Tested it with different themes: zpbase, bootstrap, paradigm.
With other albums the map and the images in the albums are displayed fine.
Normal album:
https://www.ralf-kerkhoff.de/bewegung/
Dynamic album based on tags:
https://www.ralf-kerkhoff.de/places/BurgersZoo/
For testing i created different albums to find out what is causing the problem.
As other dynamic albums work my guess was that it has something to do with the search word which is an "*" in this case.
So i looked into the gps data of some images and noticed that there are some with multiple numbers "1" in it.
Next I created an album with the number "1" as the search word = same result. Page loads forever.
Now I go for two digits - in this case "11" - and surprise: page loads fine.
My guess at this point: It has something todo that the search word has only one "number/letter/Asterisk".
what is causing the problem with a dynamic album when tidy assets is enabled.
BTW: Frontend search works fine when searching for: *
Question of the day:
Is there a search phrase/word which has more than 1 letter/number/asterisk for a "blank" search?
I have also noticed that the "*" is written in the database as "%2A" - but i guess this is normal.
Cheers
Ralf
Comments
We have to wait for the author to reply. But if it works without the plugin I would assume that it does break scripts. From the general description it moves js to the bottom. Not all scripts work if you do that.
And actually this is not really needed anymore nowadays since we have the "async" and "defer" to avoid script blocking (which ZP does not use yet though).
Tidy_assets caused issues for me also: https://forum.zenphoto.org/discussion/1411150/menu-manager-anomaly#latest
That's surely the same JS/script issue I described. It's not the menu_manager that causes your trouble but scripts from the zpBootstrap theme not being loaded properly, too. The menu_manager itself does not have any menu layout or other functionality and does not include any scripts, it only provides the data and its management.
Btw, I am not really sure if the plugin is really necessary actually in regard to speed or similar ;-)
Not a measured value - just a look and feel: It makes not that much difference when i load my site in a browser.
What makes a huge difference are the performance results you get in google page insights:
On mobile: 99
Desktop : 100
Without tidy assets enabled it is:
80 mobile
88 desktop
Our site homepage gets 98/100 although it neither does use the plugin nor is properly mobile capable yet. Of course zpBootstrap loads a bunch of extras script stuff we don't.
Those google values are important but really vary from time to time on the same site/page and even differ greatly. They are even sometimes jump around without real reason. More important than the actual main value is the CLS value. But I take the page insights more as recommendations by now unless really everything is red ;-)
Don't forget to also use the html_static cache as that also makes a huge difference if your site or server is slow especially if you have significant traffic.
html cache is enabled - that's the plugin i always enable when finished with the overall design.
Here are some numbers for cls:
Without tidy assets: cls 0.279
With tidy assets: cls 0.011
At least with zpbase as the theme there is a benefit with tidy assets enabled.
I believe it can make a difference. But for CLS a lot more things are important than when scripts are loaded. Also how a site is build in structure. It's rather complicated ;-)