Public can't view photos only logged in user

I didn't notice this happen before my upgrade from 1.44 to 1.45 but the public can't zoom into photos.

Is there any settings I missed besides disabling "Image Processor security" which keeps a public user from viewing a full image? I mean when I disable that option, everything works fine.

It's strange that when I'm logged in as an admin, I can view everything, thumbnails and all full images down to zoom level. When I logout I lose the access to the full image yet I can see thumbnails and the previews.

Symptoms :When the public clicks on the thumbnail then sees the preview it's fine but then

*From chrome when they click to view the full image it displays "Access to the webpage was denied"

*From firefox when they click to view the full image it displays "The image 'http://www.xxx.org/....' cannot be displayed because it contains errors

*From IE when they click to view the full image it displays " The website declined to show this webpage"

The zenphoto security log doesn't show anything nor does the debug log seem to show anything related.

Comments

  • First lets be sure we are using the same terminology. In Zenphoto "full image" refers to the original image stored in the albums folder (as opposed to the sized image shown on your image.php page.)

    For full images there is a setting that controls access. (Image processor security just prevents someone from concocting an image processor URI and bypassing your password protection.)

    Use the "full image protection" option set to "unprotected". You may also have to adjust your file and folder permissions on the albums folder and on the albums and images themselves. If those prevent browser access the image will not load.
  • Yes I'm sorry. It is the full image that I would like the public to view. Thanks for the clarification. I still can't find the "Full Image Protection" option for public users whom don't log on.

    Thanks!
  • fretzl Administrator, Developer
    It's under options -> image
  • Wait disregard below.. I'm looking into it:

    Logged in as admin under options/gallery the gallery is set to public. I thought that option would allow the public to view the full image original.

    Also there are options underneath which I can check off unprotected pages but even with all of them checked, the full image doesn't open up without logging in.

    :(
  • Excellent that worked.. Thanks very much!
  • meegja Member
    I suddenly have the same with 1.45: I do not have a login option since my site is fully Public. Before people could view the image in full by clicking it and they did see the full image. I did had Protected View to On and also I used the "make image name unclear in cache" (don't know how it's called in English :) ).
    Now I can not do that anymore. With the above in 1.45, people get a ZP-logo with an acclamation mark (../zp-core/images/err-imagegeneral.png). The only way to let other people see the full images, is to set my gallery to Unprotected View? But then the Prevent Hotlinking option does not work anymore (as I understand it) and also the making unclear of the image name is not working anymore.
  • acrylian Administrator, Developer
    A link maybe so we can take a look?
  • meegja Member
    @ acrylian
    http://www.3dart4u.com/ ... for now the default Garland theme is set. It's set now as Protected View, full images are cached, Hotlinking Off, make cached names unclear. Going through all the thumbs and so on works just fine. Also when hovering over the big thumb to go to the full size image, I can see that the image name is made unclear. But when clicking it, I get that ZP icon.
    Also something else that (maybe) is connected: no matter what I do, the "Register for this site" is always visible except when I am logged in as Admin. And when the "Register for this site" is clicked, a blank page is shown. Under Options/Gallery it is set to Public, so that is okay.
  • acrylian Administrator, Developer
    Standard question: Errors in the logs?
  • meegja Member
    The Setup and Security logs show nothing special.
    The Debug log is full with lines like this:

    `
    {32599:Fri, 12 Jul 2013 13:46:37 GMT}

    NOTICE: Use of undefined constant _PAGE_ - assumed '_PAGE_' in /home/dart/domains/3dart4u.com/public_html/zp-core/template-functions.php on line 3478

    getCustomPageURL called from printCustomPageURL (template-functions.php [3505])

    from footer (functions.php [105])

    from include (image.php [95])

    from include (index.php [112])

    from index.php [15]
    `
    For me abracadabra, only thing I know is that I did not mess in the PHP pages themself.
  • please look at your configuration file. There should be an item:
    `
    $conf['special_pages'] = array(
    'page'=> array('define'=>'_PAGE_', 'rewrite'=>'page'),
    'search'=> array('define'=>'_SEARCH_', 'rewrite'=>'page/search'),
    'archive'=> array('define'=>'_ARCHIVE_', 'rewrite'=>'page/archive'),
    'tags'=> array('define'=>'_TAGS_', 'rewrite'=>'page/search/tags'),
    'news'=> array('define'=>'_NEWS_', 'rewrite'=>'news'),
    'category'=> array('define'=>'_CATEGORY_', 'rewrite'=>'news/category'),
    'news_archive'=>array('define'=>'_NEWS_ARCHIVE_', 'rewrite'=>'news/archive'),
    'pages'=> array('define'=>'_PAGES_', 'rewrite'=>'pages')
    );
    `
    in it. If not then you will need to restore the contents. Depending on what caused the initial problem you may be able to restore these with the rewriteTokens plugin. If not you will need to delete your config file and re-run setup. Be sure, of course, to make note of your database setup first.
  • meegja Member
    I did check and the lines you describe are in the zenphoto.cfg file.
  • Try using the plugin to do a reset anyway.
  • meegja Member
    Okay, I have to check Reset there and then Apply? Or do I have to change something else in there too?
    Btw: what are Tokens?
  • acrylian Administrator, Developer
    The tokens are the placeholders for the rewritten urls as listed in the config file above. See also:
    http://www.zenphoto.org/news/zenphoto-1.4.5#change-in-rewrite-rule-handling
  • meegja Member
    Okay, did do the Reset but no difference: full images can not be seen by public when Protected View is On. So for now I did set it to Unprotected View.
    Remains the part why on my site there is always the "Register for this site" option? When it is clicked a blank page is shown. I did set my site as Public so no registration is needed.
    Btw, it was a complete clean install of 1.4.5., so no upgrade.

    PS
    I did change theme but also there exactly the same problem.
  • meegja Member
    Just discovered that the same problem is there when Colorbox is active: a popup is there but with the ZP logo with acclamation mark. So it comes down to this: no matter what I do, people can not see full size images or sized images with Colorbox. When I am logged in as Admin, there is no problem.
    And as far as I see it, my site is in "registered mode". So only people who register and sign in can see full images. But, I have set my site to "Public" (Options/Gallery). Also, the register plugin is not enabled. But still the option is shown to register.
  • Your theme is a copy of the garland theme. Please make sure that your problems are not caused by something done to the theme by using an unmodified distributed theme.

    Also, you do have the register user plugin enabled. Maybe because the copy theme forced that?
  • meegja Member
    @ sbillard
    Yes, it's a copy. I used the Duplicate option in ZP just to prevent I mess up the original ;) But it doesn't matter which theme I use: they all have the above problems.

    And no, the register plug-in is not enabled so a blank page appears when the mysterious Register link is clicked on my page.
  • acrylian Administrator, Developer
    A blank page means normally one of these:
    - A fatal PHP error which should be noted in the logs
    - A server misconfiguration because of a permissions issue or htaccess issues. That is not necessarily in the error log. But maybe in the access log of the server.
  • meegja Member
    Eh no, in this case a blank page is l;ogical since the plug in is not enabled. All the time that d*mned Register Here thing is there which I can not get rit of. That Register thing is pointing to http://www.3dart4u.com/index.php?p=register which does not exist ... well, maybe it does but it's not active since I do not have the plug-in enabled so it is showing a blank page
  • acrylian Administrator, Developer
    All official themes have a register page so the link would be correct. The register link only shows if it is enabled actually (unless you see any cached page).
  • In addition, Zenphoto does list in an html comment the enabled plugins. Your site lists the register user plugin as enabled.
  • meegja Member
    But I have no registering enabled and not looking at a cached page. So how can I disable that register link? Like I said before: the register plug in is not enabled and I have set my page to Public. I think I missed the setting then to remove the Register link?
  • acrylian Administrator, Developer
    @sbillard: I indeed see no register plugin enabled in the comments. Actually it seems this is a bug of Garland as the register link shows up on our own demo then as well. The plugin is not enabeld there as well.

    @meegja: You will have to manually modify the function footer() within the functions.php of your Garland theme copy to remove the call.
  • Register user link is fixed on GitHub now.
Sign In or Register to comment.