Magic image creation?

Hi,

i recently update to 1.4.5 but i have a strange problem now.

Zenphoto shows almost every picture twice on the search and tag sites.

In the backend it shows more pictures than my gallery actually has. When i update the database, the number of images goes back to normal and the "twin" pictures are gone. After about half an hour or so, they reappear.

I found out that zenphoto creates a folder "." in the _albums table and afterwards it creates every folder again, like "./Photos", "./Photos/Japan" etc.

There is no such folder in my filesystem.

Do you have a clue what kind of error this might be?

Thanks a lot!

Fuzzi

Comments

  • acrylian Administrator, Developer
    Zenphoto is file system based and takes the folders that are within the root /albums folder. It does not create folders there unless you tell it so via the "new album" button or uploading some.

    It does ofcourse create folders in the /cache directory but for sure nothing starting with a dot.

    Files/folders starting with a dot are generally invisible files. Like the .htaccess file. Or the known files on Mac OS X like .DS_Store that are normally invisible.

    Are you maybe uploading via FTP and using another tool for local image management that might use invisble files for managing its own stuff?
  • The `dot` you are seeing is a representation of the current folder by the file system. This folder is always present as it is created by the computer file system. However normally Zenphoto will ignore it as it excludes folders starting with a period.

    About the only thing I can think of is that the representation for the period on your system is somehow not the ASCII/UTF-8 period representation.

    At any case, this is not something that has changed on the 1.4.5 release, so perhaps something on your server has changed?
  • Thanks a lot for your help acrylian and sbillard! Sadly none of the tips worked. I asked my hoster if there are any hidden files or directorys which i cant see through my ftp client - but they were none.

    I also ran the setupscript again and changed the charset to "filesystem" but 30 minutes after refreshing the zenphoto db the "." folder reappears in the database and the images start to double themselves.

    do you have another guess where i might look for the error?

    Thanks a lot, have a nice weekend!
  • There is a plugin named "filter-file-searches" in the GitHub unsupported repository (https://github.com/zenphoto/Unsupported) that might help. If it shows the period folder you will be able to check the box to ignore it.
  • I tried it but the problem is i cannot see the duplicate albums in the zenphoto backend. They are only visible in the database.

    Right now, i waited until zenphoto created every folder twice in the db and then i have set the duplicate albums invisible. That works quite well even if its a very dirty and unprofessional solution :)
  • Sorry for the problem, but if your file system has multiple representations for the same album that is your only solution.
  • Hmm sadly the database seems to update every few days so the duplicate images get visible again. So i have to discover a new solution.

    Do you have any hint what i could do to exclude the images on search.php which "folder" in the db begins with ./?

    Or do you have another guess what could cause the problem?

    Thanks a lot :)
  • acrylian Administrator, Developer
    Well, since Zenphoto is file system based it will take everything it (re-)discovers. I have really no idea where these come from, never encountered that anywhere.
    You could try the support build that should ignore files/folders beginning with "." explicitly now. Maybe that helps.
  • Thanks! I just installed the support build - but the problem stays the same. a few minutes after the installation,the duplicate images and folders appear.

    Is there a way to access the "folder" of the image on search.php so i can filter out the duplicate images in the template?
  • acrylian Administrator, Developer
    I really never heard of this before and if my colleague has no other idea than above I don't as well.

    Zenphoto will discover them regardless if they are there. I still don't get what these folder actually are and why they are there at all. You could try a function to clear the database from these regulary.
  • Hi acrylian, thanks for the quick answer. I have no clue as well. I made a cronjob now which deletes the albums starting with ./ every 5 minutes.
  • I talked to my hoster again, they said the only things changed when we had to move to a different server was mysql from 5.1 to 5.5 and php from 5.2 to 5.4.

    Do you think this could have anything to do with this problem?
  • acrylian Administrator, Developer
    I don't think I do all my local testing on PHP 5.4 and MySQL 5.5 (using MAMP) and never encountered this.
  • If you are running the support build I see no way that you could be discovering anything that begins with a period. Those are simply ignored in the processing. So the folder name must somehow be different.

    You can take a look at the `filter-file-searches` plugin that I mentioned. If you can discover the pattern of these folders you can modify that script to ignore them.
Sign In or Register to comment.