How to update RSS feeds?

Hi. I uploaded some photos to the albums folder. They appear in the gallery; however, the site RSS feed is NOT updated. How can I update the RSS feed?

Using the "upload" tab is NOT option because I normally add about 100 photos each time. I also tried the "pre-cache images" option.

Comments

  • acrylian Administrator, Developer
    Zenphoto is file system based and does not check the file system itself. News images are only added to the db either if someone visits it or if you precache ("lazy evaluation" method). If they appear in the gallery and you visited theme they should also appear on the feed since that is entirely database based.
    Take a look at this (simplifed) diagram to see how Zenphoto works:
    http://www.zenphoto.org/wp-content/uploads/2008/09/zenphoto-12-image-discovery12.pdf
  • Thanks for the reply.

    According to that diagram, the generation of RSS feed should be transparent to the user -- if you upload a new folder, then visit the gallery, the RSS feed should be automatically updated, right?

    Unfortunately, I tried that and it doesn't seem to work on my site. I uploaded a new subfolder to the root "albums" folder (using rsync), I then visited the new folder. However, the RSS feed of the root "albums" folder wasn't been updated -- it still displays the same old feed. The new folder is 3 levels down, the new pictures have timestamps newer than the pics in the old feed.

    Perhaps I'm misunderstanding how RSS feeds work? I thought that the RSS feed for the root "albums" folder showed updates to *ANY* subfolders, not just the top level.

    I'm also getting an error because the folder name has an apostrophe in it -- I can view it in the gallery but I can't access the folder in the edit tab. Could that be why the RSS feed is not updated? (I thought that the bug with folders with apostrophes was taken care of.)
  • acrylian Administrator, Developer
    Yes, the rss feed works like you describe. Regarding subalbums, the normal album feed you see by default on the standard themes shows only the new images for that album, not it's subalbums. It is possible but you need to change your theme to use the "collection" mode option for the feeds then. See our functions guide for the template rss functions and its parameters.

    The apostrophe might be related, generally they should work, but it also depends on your server if it likes that.
  • So let me see if I get this straight, the main RSS feed -- <domain>/rss.php?lang=en_US -- only shows updates for the root level album, not its subalbums?
  • acrylian Administrator, Developer
    No, that feed should show all latest images of all albums. But as said Zenphoto does not look by itself for new images they have to be viewed by someone (or uploaded via the admin backend) so they are added to the database. Alternatively you can hit the "refresh database" ulitlity button on the backend's overview pages and/or precache your images (what may cause some overhead with really a lot and big images).

    Each album has also an rss feed that shows only the latest images of that album. Alternatively you can set up the collection mode to include that album's subalbums, too.
  • Thanks for your help acrylian. The main RSS feed (by default) should show ALL latest images in ALL albums. However, it does not work in my gallery. After I added a new folder with new photos, visited the new albums, and precached the images, the main RSS feed still shows the old images. (The folders and filenames had no apostrophes or other strange characters, except spaces.)

    When I changed the RSS mode to "Collection," I got an error message as per the other forum post.
  • acrylian Administrator, Developer
    I am sorry, but I can't reproduce the issue with the main rss feed. It works for me since we made it. If you look at the feed's db queries it just takes the info from the images table. What reader do you use? You are the first to my knowledge who noticed something like this. (regarding the "apostrophes", I know that it generally should work but I know some shared hosts where your get problems if you use these, accents or other special chars)

    I read your other post and will try to reproduce the error with the collection mode. I'll let you know what I find out.
  • OK, here's a summary of what's going on. I started with a fresh default install. My host is hostmonster.

    I added a Test album with another test album 3 levels down: Test album>>2009>>Another test album. After I visited the sub album, the RSS feed displayed fine.

    (To clarify how I'm adding albums -- I'm adding them through the FILE SYSTEM, so I'm actually adding folders on the server in the "albums" directory.)

    Then the fun began when I added an album with an apostrophe in the name. The album showed up in the main gallery but clicking on the link, gave me this error:
    The Zenphoto object you are requesting cannot be found.
    So I enabled mod_rewrite in options. On the surface, everything appeared fine. The album displayed correctly in the gallery. However, the RSS feed did NOT work. It showed links to broken images. Those broken images where in the album with the apostrophe. I tried that with another album with apostrophes and the same thing happened again.

    This leads me to believe that zenphoto does not like apostrophes. But why? Gallery2 on the same server works just fine. I had folders with apostrophes and Gallery2 imported them just fine... I'd really love to use zenphoto, but a broken RSS feed is a deal breaker for me...

    The second issue I'm having is with Collection mode. It fails on the main page but works fine on subalbums (regardless of name). This is the error I'm getting:
    Fatal error: Call to a member function getFolder() on a non-object in zp-core/tempate-functions.php on line 3433
    (After poking around the php code, apparently, it doesn't consider the main gallery to be an album.) The error is directly in the main page for gallery -- an RSS reader has nothing to do with the error.
  • acrylian Administrator, Developer
    About the apostrophes I can just say to try the nightly build (maybye you have already). Maybe that is solved there.am not the expert on this encoding stuff and it should actually work. Call me old school but I just had the best experience to avoid specials characters and I am German and we have some of them! Therefore I don't know hostmonster at all.

    Regarding the "collection" rss mode: Maybe it is not clearly documentated but it needs to be called on an album on album.php ($_zp_current_album must be set) since it is meant to collect from a specific album and all of it's subalbums. It can also be a subalbum of an album and the subalbums of that but it must be an album. So the error on getFolder is absolutly correct. This has indeed nothing to do with a rss reader.

    For the main gallery the "gallery" option is to be used. I am sorry I have tried both modes and they work without any error in my installation. If that does not work it might be related somehow that the feed currently sorts by mtime. You might try to change the mtime to id in the query within the rss.php.

    Maybe you could post a link to your rss.php so that I can take a look. Maybe I spot anything that could be the cause.
Sign In or Register to comment.