Fatal error: Call to a member function getThumb() on a non-object

Hi,

I finally sorted my theme 95% to the way I wanted it so decided to create a few new albums... then!

Fatal error: Call to a member function getThumb() on a non-object in C:\Inetpub\vhosts\mysite.com\httpdocs\v1\gallery\zp-core\class-album.php on line 796

Can anyone tell me why that is happening? I'm using 1.2.6 nightly build from 4 nights ago and my theme is the default one that I've altered myself slightly to my design. Have I got to start designing my theme all over again? If so... I might cry!

Thanks.

Comments

  • I can't tell you why it is happening--its your theme, after all. But I can tell you what this error means. It means that you have used a varialbe a that is supposed to be an object (prsumbably an image object) but it is not. Most likely the variable has not been setup.

    The particular function is dealing with thumbnail images, so maybe you have done something related to that?
  • I deleted all new albums I had created... then got it working again. However, everytime I create a new album I get the error above or:

    Fatal error: Call to a member function getCustomImage() on a non-object in C:\Inetpub\vhosts\mysite.com\httpdocs\v1\gallery\zp-core\template-functions.php on line 1462

    Thats is the error I get with the zen default theme being used? So must be something to do with ZenPhoto? or my settings? Seems a problem with creating a new album? Would my permissions for creating be a problem or something? worked fine before I reinstalled zenphoto but never altered the album folders.

    Another question: If I have several of my albums on my pc can I just ftp them to my webspace in the folder where the albums are and they will be displayed in the order I lay them out? Although at present they are not recognised at all if I did that due to the problem above.

    Help please!?
  • Problem solved I think. When creating the new album I never completed every option. I now created an album and filled in every single field and it worked. Seems the album creation must have some required fields and I missed out one of them?

    Still wondering about my other question, was wanting to upload my whole gallery quickly.. Is it possible to drag and drop it? Or do I need to go and create every album through the admin interface? i.e. basically create the structure on my pc then just upload it?

    Question: If I have several of my albums on my pc can I just ftp them to my webspace in the folder where the albums are and they will be displayed in the order I lay them out?

    Hope that makes sense to someone, thanks again.
  • acrylian Administrator, Developer
    You can upload folders with images via ftp and Zenphoto will recognise them as albums (numerous times stated on the forum and also on the home page). The order of the images within is however determined by the sort order set on the options and how Zenphoto recognized them. See the troubleshooting entry for info about the image/album discover procedure.

    There are no "required" fields as such. Why it didn't work might have several reasons like too big images to process. Again please see the troubleshooting entry.
  • Hi,

    I have managed to create the albums now no problem using the interface and filling in the options completely. There does appear to be a required field as if I simply create an album it doesn't work unless I fill in every field... not sure what is the minimum amount of fields I can fill in to create it? If I create it in my webspace and put an image in it it works fine. So maybe you need a field complete or an image within for it to be created properly. Sorted anyway as I now know how to solve.

    The other problem I was having was that the other folders I was having problems with were in a password directory and I realise that it fails unless you set a password to the albums within the passworded directory. Therefore, need to create using the interface and set password. Not sure if there is a way of assigning a password using the ftp upload of a folder. Or whether option to have same password as the directory that it is contained within.

    Thought I'd post my findings as may help someone in the future.

    Thanks a lot for your response...
  • acrylian Administrator, Developer
    1) There are no required fields. Just upload folders with images and it works. If there are issues there must be anything else. Look at the server's error log for example. Without a live example or more info of the issue we are just wild guessing.

    2) Zenphoto needs access to a folder within `albums` and its images. if you password protected it via .htacces (which I just assume) Zenphoto will not be able to access it.
    The password from within the backend is not a real folder password since Zenphoto actually does not directly access the folders within the albums folder to display an album/image. It uses the full image to generate and cache the sized ones that are then displayed. Therefore you can't set a password via ftp.
  • Hi,

    Thanks for the responses. Appears to work now if I upload to my albums folder by `ftp`.

    The admin interface only works when I create an album and assign a date and description to it etc. If I just create an album it causes the errors as detailed above.

    I'm happy with the uploading through `ftp` though, and making galleries with date and description anyway when no `ftp` access. Just thought I'd point out it doesn't work unless I include the description or date.

    http://www.stuartjackson.co.uk/v1/gallery/

    Thanks again for your time, getting closer to what I fully want now. :-)
  • Please describe exactly the steps you did with the admin inerface. For instance, what do you mean by "create an album"? At least as far as Zenphoto is concerned, creating an ablum is an independent operation from editing the album dataset. Also, if you do edit the dataset, all the fields get updated whether you enter something or not.

    So, it is hard to see what setting the date/description could have to do with the problem.
  • Hi,

    I can live with the slight problem as it doesn't affect me using the application.

    When in admin, I click 'albums', then i click 'New Album' then 'give it a name' then click 'save'.

    That's all I do. It then creates:

    Fatal error: Call to a member function getCustomImage() on a non-object in C:\Inetpub\vhosts\mysite.com\httpdocs\v1\gallery\zp-core\template-functions.php on line 1462

    The errors do vary slightly, thumbs or custom image etc.

    I then have to manually delete through ftp the folder to get the gallery working again. Tried this through the default and my own theme. It however works if I add a date or whatever when creating the album?

    As I said though, I'm not that fussed as it works if I ftp and just create that way or assign a date etc. So it works well enough for me.

    Thanks again.
  • acrylian Administrator, Developer
    We still think that it should have nothing to do with the fields filled or not. Anyway, I could not reproduce this with the current nightly build. So please try that as well.
  • thestormtrooper,

    I notice you're running this on a windows platform, what version of windows are you running? Is it possible that you're running vista and your webserver doesn't have the elevated privledges necessary to create/execute? From the error above it sounds like it's trying to do something with a file not created...

    Just a shot in the dark from your avg user here though.

    Edit: I say vista cause that's a common problem causer, but I suppose any version of windows that doesn't have proper rights setup maybe?
  • Tried it on the xp and vista laptops in my house and both have the same error. As regards to my hosting I ran the setup again to see if that made any difference.

    I have ? beside:

    > PHP magic_quotes_gpc [is enabled].
    > PHP setlocale() failed.
    > PHP mbstring package [Your internal characater set is ISO-8859-1].
    > Server seems not to be Apache or Apache-compatible, .htaccess not required.

    Is it ok I have those errors/suggestions? I seemed to think it was ok to run with those errors?

    The gallery seems to work fine for my purposes anyway at present... although I've still to add my user login which is my next and final hurdle before I've completed my site fully the way I want! getting there :-)
  • acrylian Administrator, Developer
    Setup should also explain about these warnings. Magic-quotes is preferredly disabled, setlocale and mbstring more or less related to translations/languages using special characters.

    Since you are on Windows the last note is normal. We are not able to officially support Windows or other server systems as we can't test on them.
Sign In or Register to comment.