ZenphotoCMS Forum
printAlbumStatistic function bug ? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: printAlbumStatistic function bug ? (/thread-11526.html)



printAlbumStatistic function bug ? - flu - 2013-12-05

Hi guys,
I've just noticed that using the printAlbumStatistic function on my index page adds the suffix (.php or .html as chosen in the general settings) of the page at the end of the generated links.
So I get links like this :
http://www.domain.com/album-title/sub-album-title/.html
which of course doesn't work.

Zenphoto 1.4.5.7 [59c22b2fba]
PHP : 5.3.22
MySQLi : 5.1.67
Theme : lightly custom ZPskeleton

And that's the same thing with the printLatestUpdatedAlbums function.




printAlbumStatistic function bug ? - acrylian - 2013-12-05

Looks like a bug, please open a ticket.




printAlbumStatistic function bug ? - sbillard - 2013-12-05

From looking at the code it seems that this would happen if there are no images in the album. Can you confirm that this is your case?




printAlbumStatistic function bug ? - acrylian - 2013-12-05

Line 182 "$albumpath" looks as if it could be updated with an proper $obj->getImageLink() call at least. But that part only takes effect if you set the parameter for the "firstimage of album" link.




printAlbumStatistic function bug ? - flu - 2013-12-05

Hi guys,
thanks for the quick replies.
Stephen, yes there are no images in the top level albums but only subalbums containing images.
Acrylian, as far as I understood, by default the firstimage of album link is set to "false", so using the function like I do :

should not have changed something about it, right ?

Do you still want me to open a ticket ?




printAlbumStatistic function bug ? - sbillard - 2013-12-05

No, fix is on the way.




printAlbumStatistic function bug ? - flu - 2013-12-05

Smile


printAlbumStatistic function bug ? - flu - 2013-12-09

Hi guys.
Current nightly ?




printAlbumStatistic function bug ? - acrylian - 2013-12-09

Yes, but there are of course no "nightlies" anymore. The support build is updated when it is updated actually ;-)




printAlbumStatistic function bug ? - flu - 2013-12-09

Ah ok,
I've just realized that it's done here (yeah, I know...) :
https://github.com/zenphoto/zenphoto/blob/master/zp-core/zp-extensions/image_album_statistics.php

Let's give a try...




printAlbumStatistic function bug ? - flu - 2013-12-09

It works.

Many thanks, guys !