Summary | "Photos not found" error in lib/Ansel.php |
Queue | Ansel |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | tinu (at) humbapa (dot) ch |
Created | 04/03/2008 (6306 days ago) |
Due | |
Updated | 04/12/2008 (6297 days ago) |
Assigned | 04/09/2008 (6300 days ago) |
Resolved | 04/12/2008 (6297 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
see where you would get an error "pop-up in a new window".
getImages() was just returning a PEAR_Error - and that error was only
being logged to the horde log...that's it.
Your point is valid though about returning an error when image count
== 0, but I have fixed it somewhat differently. IMO, a getImages()
method shouldn't care at all, or even have to know about, any
subgalleries. I changed the method to return an empty array() in that
case which makes more sense to me. I also changed the if-clause in
getChildren() to only call getImages() if we actually have any images.
This will save an additional database query for each page since we
already load the image count when we instantiate the gallery object.
http://lists.horde.org/archives/cvs/Week-of-Mon-20080407/077308.html
Thanks for the report.
description of how to reproduce (what gallery style you are using,
what exact page the error is thrown on etc...)
occurs when I view the main gallery. e.g.:
http://www.humbapa.ch/horde/ansel/view.php?view=Gallery&gallery=2
(the PEAR-error should popup in a new window)
Ansel_Gallery::getChildren() - which (should) take into account any
subgalleries before it calls getImages().
images. so, if there is room (e.g. only 1 subgallery) getImages()
returns "Photos not found" if there aren't any more photos. this error
message is correct, but from my view it doesn't make much sense to
raise an error if there are subgalleries with photos. maybe one could
log that with PEAR_NOTICE...
State ⇒ Feedback
this. Just about *all* of my top-level galleries contain nothing but
sub-galleries. If you are running latest CVS, please give a detailed
description of how to reproduce (what gallery style you are using,
what exact page the error is thrown on etc...)
The image tiles in the gallery views are actually obtained via
Ansel_Gallery::getChildren() - which (should) take into account any
subgalleries before it calls getImages().
Assigned to Michael Rubinsky
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ "Photos not found" error in lib/Ansel.php
Queue ⇒ Ansel
Milestone ⇒
Patch ⇒ No
New Attachment: Ansel.php.patch
State ⇒ Unconfirmed
I view such a gallery I got an errormessage saying "Photos not found".
the methode getImages in lib/Ansel.php checks if there are any images
inside a gallery an returns "PEAR::raiseError(_("Photos not found"));"
for 0 images. my small patch changes that behaviour so that the error
only occurs for 0 images and no subgalleries.
thanks!