![]() |
|
Problem with last image - 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: Problem with last image (/thread-11306.html) |
Problem with last image - ism-design - 2013-08-29 Hi I am having a weird issue, everything works fine except the last image of every album will not show but gets an error returned. Fatal error: Call to a member function getTitle() on a non-object in /home/content/00/7926600/html/i-am-peter.com/themes/Square-One/image.php on line 27 Only happens with last image. This is the code I use, and where I expect an issue. next image is Problem with last image - acrylian - 2013-08-29 You need to check if there is a next image. If there is not there is no object and this error is natural. There are theme functions for next/prev images (you normally don't need to use the oject methodes directly here) or you have check i $nextim is an object. Same applies of course for the previous image. Problem with last image - ism-design - 2013-08-29 Hi Acrylian, thanks for the fast reply. this error also occurs when clicking on the last image in any of my albums. site is www.i-am-peter.com Problem with last image - acrylian - 2013-08-29 Yes because you don't check if there is a next image. Please review the theming tutorial and the standard themes regarding the next/prev navigation. Problem with last image - ism-design - 2013-08-29 Hi again Acrylian I could not find anything about the navigation in the user guides, but managed to get it working by re-copying the working code from skeleton theme and re-arranging things a bit. Thanks again for replying P.H. Problem with last image - acrylian - 2013-08-30 The theming tutorial has examples of standard theme pages that exactly show the next/prev function usage. Of course zpSkeleton is a not a official theme and does a few things off the "standard". |