subalbums and other pages broken

I installed zenphoto 1.1.4 using the highslide theme and experience problems in regards to the display of subalbums and images.

It works fine with regular albums like this one: http://www.deceitful-tranquillity.de/gallery/work-in-progress/
but subalbums are displayed like this:
http://www.deceitful-tranquillity.de/gallery/miscellaneous/roses/
the same happens when you try to get to the second page in this album
http://www.deceitful-tranquillity.de/gallery/miscellaneous/
http://www.deceitful-tranquillity.de/gallery/miscellaneous/page/2/

When I tried the default theme pictures wouldn't be displayed at all.

I'd be glad for some advise to solve that problem.
Thank you!

Comments

  • Have you tried a different theme? The "highslide" theme doesn't seem to be an included theme, so it could be out-of-date.
  • A Member
    It is the same problem with the default and other included themes.
    And when I try to display a picture in full size in the default theme I get a page with this message: "Zenphoto Error: the requested object was not found. Please go back and try again." instead of the picture being displayed.
  • Looks like I missed the sentence where you answered that question in your original post.

    Have you modified the theme? Looking at the source for the "miscellaneous" album, you have this path structure:

    "/gallery/themes/highslide/styles/dark.css"

    This suggest you have installed Zenphoto into the "gallery" directory such that there is "gallery/themes", "gallery/zp-core", "gallery/albums", etc.

    But when I go into the "roses" sub-album, I find this path referenced:

    "/gallery/miscellaneous/themes/highslide/styles/dark.css"

    So either the theme has a bug that needs to be fixed by its maintainer, or you have modified it in some way that has broken it.

    In regard to the default theme, what errors do you get in your server log? It should show the pictures.
  • acrylian Administrator, Developer
    I have no direct clue, but have you tried disabling mod_rewrite?
  • At the end of your zp-config.php file you will find:
    `////////////////////////////////////////////////////////////////////////////////

    // Path Overrides

    ////////////////////////////////////////////////////////////////////////////////

    // Uncomment the following two lines ONLY IF YOU'RE HAVING PROBLEMS,

    // like "file not found" or "not readable" errors.

    // These allow you to override Zenphoto's detection of the correct paths

    // on your server, which might work better on some setups.

    ////////////////////////////////////////////////////////////////////////////////

    // define('WEBPATH', '/zenphoto');

    // define('SERVERPATH', '/full/server/path/to/zenphoto');`

    Try changeing thse to what your site requires. On some installations the zenphoto detection does not work correctly. In the first devine, `zenphoto` should be `gallery` You will have to figure out the correct setting for the second define.
  • A Member
    Thank you for your assistance. It seems to be working fine now.

    I changed in both devines "zenphoto" to "gallery" and since subalbums still weren't working after that, I also disabled mod_rewrite. Since then subalbums are working fine and pictures are displayed correct in default, highslide and smooth theme.

    Thank you very much!
    Andrea
  • I am also having these same problems with sub-albums where I get a "Not Found" error when trying to access them. The rewrite rules seem to work for top level stuff, but when I have a nested sub album, it breaks.

    http://gallery.macsplaceonline.com/home-renovation-projects/ <<works

    http://gallery.macsplaceonline.com/home-renovation-projects/kitchen-floor/ <<doesnt work

    I have made no changes to the theme, as I'm just using the base one. The install I downloaded this weekend did not include an .htaccess file (other than the lighttpd on - which I dont know how to get running) so I used another I found on the boards here:

    # htaccess file for zenphoto
    # NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.

    <IfModule mod_rewrite.c>
    RewriteEngine On

    # !!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!!
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
    RewriteCond %{REQUEST_FILENAME} -d [NC]
    RewriteRule ^.*$ - [R,L]

    RewriteRule ^admin/?$ zen/admin.php [R,L]

    RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
    RewriteRule ^page/([A-Za-z0-9\-_]+)/?$ index.php?p=$1 [L,QSA]
    RewriteRule ^([^/]+)/?$ index.php?album=$1 [L,QSA]
    RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
    RewriteRule ^([^/]+)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA]
    RewriteRule ^([^/]+)/image/([^/\\]+)$ albums/$1/$2 [L]
    RewriteRule ^([^/]+)/([^/\\]+)$ index.php?album=$1&image=$2 [L,QSA]

    </IfModule>

    Perhaps this is an older version of the .htaccess file, and doesn't account for sub-albums??

    Any help here is greatly appreciated... I absolutely love this photo package... smokes c@ppermine hands down, and is so much like Wordpress it's not funny. (which is a really good thing)

    EDIT: and yes, the system works fine with mod_rewrite disabled in the admin
  • acrylian Administrator, Developer
    This is indeed an older htaccess file which is not recommended. The htaccess file is named .htaccess and invisible on your computer since you apparently using a Mac..:-) It is visible in a FTP client like Transmit or Cyberduck. Or you just use one of the tools to make it visible, lot of them on www.macupdate.com.
  • Well.. that IS a problem on Mac, and I always just name the file ##.htaccess in order to view/edit it, but if I can't see it from unzipping the installer, then I can't very well FTP it for use. Is it possible someone give me a link to the most current htaccess file as copyable code, or provide it here? Or would that reveal too much to the kiddie scripters looking for the structure of zenPhoto?

    EDIT: whoops.. nevermind... found some tools for viewing hidden files... thanks for the link
  • acrylian Administrator, Developer
    I am Mac user myself and I have no problem with unzipping and FTP, so I didn't exactly understand your problem.
  • @.htaccess so that is shows up without having to tweak OSX into showing hidden files.

    I downloaded a tweak from the site you provided in order to view, modify and upload the .htaccess file provided with the install, but the sub-album is still broken. It "loses" reference to the CSS file, the images as well as the links for some reason.

    http://gallery.macsplaceonline.com/home-renovation-projects/ <<works

    http://gallery.macsplaceonline.com/home-renovation-projects/kitchen-island/ <<doesn't work

    when you are in the sub-album pages, like kitchen-island, the links at the top are also wrong, as it doubles up on the sub-album name:

    `

    `

    So I guess I will have to disable the mod rewrite, although a more user friendly naming feature. Below is the .htaccess file that was included with the installer I downloaded over the weekend, for reference:

    # htaccess file version 1.1.4.0

    # Update the above and the define in setup.php when you make changes to the rewrite rules!

    # NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory. (Or let setup.php do it for you!)

    <IfModule mod_rewrite.c>

    RewriteEngine On

    #### !!! Change this to the web path (eg: http://www.yourwebsite.com/photos --> /photos) !!!

    RewriteBase /
    ####

    RewriteRule ^admin/?$ zp-core/admin.php [R,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^.*$ - [R,L]

    RewriteRule index\.php$ index.php [L,QSA]

    RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/?$ index.php?p=$1 [L,QSA]

    RewriteRule ^(.*)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]

    #### Rewrite rule addtion for search

    RewriteRule ^page/([A-Za-z0-9\-_]+)/fields([0-9]+)/(.*)/([0-9]+)/?$ index.php?p=$1&searchfields=$2&words=$3&page=$4 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/fields([0-9]+)/(.*)/?$ index.php?p=$1&searchfields=$2&words=$3 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/archive/(.*)/([0-9]+)/?$ index.php?p=$1&date=$2&page=$3 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/archive/(.*)/?$ index.php?p=$1&date=$2 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/tags/(.*)/([0-9]+)/?$ index.php?p=$1&searchfields=4&words=$2&page=$3 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/tags/(.*)/?$ index.php?p=$1&searchfields=4&words=$2 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/(.*)/([0-9]+)/?$ index.php?p=$1&words=$2&page=$3 [L,QSA]

    RewriteRule ^page/([A-Za-z0-9\-_]+)/(.*)/?$ index.php?p=$1&words=$2 [L,QSA]

    RewriteRule ^(.*)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zp-core/i.php?a=$1&i=$3&s=$2 [L,QSA]

    RewriteRule ^(.*)/image/([^/\\]+)$ zp-core/i.php?a=$1&i=$2 [L,QSA]

    ####

    # Catch-all - everything else gets handled in PHP for compatibility.

    RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA]

    </IfModule>
  • acrylian Administrator, Developer
    Yes, I know that the files are invisible on OS X. I never liked Cyberduck, so I use Transmit that lets you browse the files.
    Maybe we should really consider putting the file into the package so that even OS X user can see it.

    As for the missing CSS, I guess you probably have a problem with the subdomain you are using. Please take a look here if that helps:
    http://www.zenphoto.org/support/topic.php?id=2176&replies=5
    http://www.zenphoto.org/support/topic.php?id=1843&replies=21
  • It's not just the CSS... even the breadcrumbs at the top have incorrect links, which leads me to believe that it's something with the mod_rewrite in the .htaccess not accounting for nested sub-albums, considering that the package works fine with mod_rewrite disabled.

    And after looking at the articles you posted about subdomains, I do not believe this is my problem, as this site is not just redirect with a subdirectory inside macsplaceonline.com. (i.e. macsplaceonline.com/gallery) It is basically it's own account, with it's own directory below the root. (just as macsplaceonline.com has) Again... it has something to do with the mod_rewrite rules in the .htaccess, as the package works fine without the mod_rewrite enabled. I will do some research and see what I can come up with.

    EDIT: The problem was not in the .htaccess or the mod_rewrite, but in the config file. I uncommented out the 2 lines @ 53 & 54, and placed the proper paths into those lines, and now things seem to work fine as far as sub-albums + mod_rewrite.

    Now my problem is viewing the individual images inside any album with mod_rewrite enabled, where I now get:

    Zenphoto Error: the requested object was not found. Please go back and try again.

    With mod_rewrite disabled, things work just fine. So I guess I will search for this new error in the forums...
  • acrylian Administrator, Developer
    Surely this is an problem of config and mod_rewrite. Mod_rewrite is notorious for that. And the next would have been indeed to suggest uncommenting that two lines. I sadly have no further idea. Please report if you solve anything or not.
Sign In or Register to comment.