Lychee icon indicating copy to clipboard operation
Lychee copied to clipboard

Public album is not and can not be configured to be public

Open Gaibhne opened this issue 3 years ago • 11 comments

Detailed description of the problem [REQUIRED]

Despite there being an album named public, the album is not actually public. Setting the public albums visibility to public manually results in an album named public, set to be public, but not actually being public. When attempting to save the visibility change, a message appears for a split second in the upper left saying Server error or API not found.

The POST request body is function=Album%3A%3AsetPublic&albumID=public&full_photo=1&public=1&nsfw=0&visible=1&downloadable=0&share_button_visible=0, the server response is a 422 - Unprocessable Entity

Steps to reproduce the issue

Steps to reproduce the behavior: Error 1:

  1. Go to site while having the album Public and not being logged in
  2. See no album named Public
  3. Be sad that you can't see the Public album

Error 2:

  1. Go to album Public while being logged in
  2. Click on + in the upper right
  3. Click on Album visibility
  4. Turn on the Public toggle of the Public album
  5. Click Save
  6. See error in the upper right
  7. Note that when you go to Album Visibility again, it will claim to be set to Public, but it is not, and after a page refresh, will correctly show the album Public not being set to Public
  8. Go to site and not being logged in
  9. Be sad that you can't see the Public album

Screenshots A sad image of a lack of a Public album A visual representation of sadness in PNG form

Output of the diagnostics [REQUIRED]

Diagnostics
-----------
Warning: Dropbox import not working. dropbox_key is empty.
Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.
Warning: Using 32 bit PHP, recommended upgrade to 64 bit

System Information
------------------
Lychee Version (git):            No git data found.
DB Version:                      4.3.0

composer install:                --no-dev
APP_ENV:                         production
APP_DEBUG:                       false

System:                          Linux
PHP Version:                     7.4
Max uploaded file size:          20M
Max post size:                   100M
MySQL Version:                   10.5.10-MariaDB

Imagick:                         1
Imagick Active:                  1
Imagick Version:                 1691
GD Version:                      2.3.0

Config Information
------------------
version:                         040300
check_for_updates:               0
sorting_Photos_col:              takestamp
sorting_Photos_order:            ASC
sorting_Albums_col:              max_takestamp
sorting_Albums_order:            ASC
imagick:                         1
skip_duplicates:                 0
small_max_width:                 0
small_max_height:                360
medium_max_width:                1920
medium_max_height:               1080
lang:                            en
layout:                          1
image_overlay_type:              none
default_license:                 reserved
compression_quality:             90
full_photo:                      1
delete_imported:                 0
Mod_Frame:                       1
Mod_Frame_refresh:               30
thumb_2x:                        1
small_2x:                        1
medium_2x:                       1
landing_page_enable:             0
landing_owner:                   Me
landing_title:                   Myself
landing_subtitle:                Cats, Dogs & Humans Photography
landing_facebook:                
landing_flickr:                  
landing_twitter:                 
landing_instagram:               
landing_youtube:                 
landing_background:              dist/cat.jpg
site_title:                      Lychee v4
site_copyright_enable:           1
site_copyright_begin:            2019
site_copyright_end:              2019
additional_footer_text:          
display_social_in_gallery:       0
public_search:                   0
SL_enable:                       0
SL_for_admin:                    0
public_recent:                   0
recent_age:                      1
public_starred:                  0
downloadable:                    0
photos_wraparound:               1
map_display:                     1
zip64:                           1
map_display_public:              0
map_provider:                    OpenStreetMap.org
force_32bit_ids:                 0
map_include_subalbums:           1
update_check_every_days:         3
has_exiftool:                    1
share_button_visible:            0
import_via_symlink:              0
has_ffmpeg:                      1
location_decoding:               1
location_decoding_timeout:       30
location_show:                   1
location_show_public:            0
rss_enable:                      0
rss_recent_days:                 7
rss_max_items:                   100
prefer_available_xmp_metadata:   0
editor_enabled:                  1
lossless_optimization:           0
swipe_tolerance_x:               150
swipe_tolerance_y:               250
local_takestamp_video_formats:   .avi|.mov
log_max_num_line:                1000
unlock_password_photos_with_url_param: 0
nsfw_visible:                    1
nsfw_blur:                       0
nsfw_warning:                    0
nsfw_warning_admin:              0
map_display_direction:           1
album_subtitle_type:             oldstyle
upload_processing_limit:         4
public_photos_hidden:            0

Browser and system

All browsers on all systems I would expect, tested with Firefox, Chrome and Edge on Windows 10

Gaibhne avatar Jul 09 '21 10:07 Gaibhne

If you are talking about the public smart album, then this album is set public via configuration of the server. It is only there to provide the user a view of all the pictures that have been shared as public within private albums.

I do agree this is not a very clearly defined behavior and will need to be fixed.

ildyria avatar Jul 10 '21 08:07 ildyria

That seems to be a rather confusing naming/behaviour, yeah. Is there any other view for the public to see all the pictures that are public ? Because that seems kind of fundamental :D

Please let me know what you would like me to do with this issue - close and start new ones about the missing feature / the misleading naming, or continue in this one ?

Gaibhne avatar Aug 04 '21 11:08 Gaibhne

Is there any other view for the public to see all the pictures that are public ? Because that seems kind of fundamental :D

The problem here (IIRC) is that you can have "public" photos that are hidden - i.e. accessible by URL, but you might want people to stumble across if they're not logged in.

The official way to make photos accessible to the public is with albums.

I'll leave @ildyria to decide where to take this next.

d7415 avatar Aug 04 '21 12:08 d7415

@Gaibhne wrote:

Despite there being an album named public, the album is not actually public.

That's intended by design. The smart album Public is basically a query which collects all photos whose attribute "public" is set to true, but the album itself is not public.

Setting the public albums visibility to public manually results in [...] a message appears for a split second in the upper left saying Server error or API not found.

@Gaibhne: How did you set the visibility of the smart album Public manually?

The GUI should not provide an option to do that. Changing the visibility attribute of smart albums is not supported. Hence, the server-side error is totally correct, but I wonder how you got there. The menu of a smart album should look like this and not provide an icon to change the visibility.

Smart Album Public

@ildyria wrote:

If you are talking about the public smart album, then this album is set public via configuration of the server.

I have to object. The visibility of the smart album Public cannot be changed by a server configuration. The smart album Public is always non-public. You can only change the visibility of the smart albums Recent and Starred. See here:

Settings

@Gaibhne wrote:

Is there any other view for the public to see all the pictures that are public ? Because that seems kind of fundamental :D

You mean a single public album which contains each and every public photo such that users who are not logged in can scroll trough all public photos at once? No, such a feature does not exist.

The normal approach would be to publish individual albums. Then all non logged-in users can see these albums on the front page.

Option of individual album:

Option

Menu:

Visibility menu

Resulting front-page:

Front page

Personally, I am not sure, if I also find it fundamental, to be able to make the smart album Public public. During times this smart album might become very huge and suffer from long loading times, because typically the set of public albums will grow not shrink. Thus having the public photos being nicely sorted in public albums make a lot more sense. This is different for the smart album Recent, because after some time old public photos will vanish from the Recent album.

But anyway, it should not be too difficult to also have an option in the configuration, which allows to make the Public album public in the same way as the Recent album. It seems that @ildyria thought we would already have that.

nagmat84 avatar Aug 04 '21 15:08 nagmat84

Personally, I am not sure, if I also find it fundamental, to be able to make the smart album Public public.

Yes. I'd be much more in favour of (optionally) making "unsorted" public. I'm still unsure about it, but it seems a better option than "public".

d7415 avatar Aug 04 '21 16:08 d7415

I don't know. Unsorted contains all photos that are not in an album, both public and private. It strikes me as less risky to make Public public than Unsorted -- though, since this would be enabled by configs that need to be explicitly toggled, I have no problem having such configs for both...

kamil4 avatar Aug 05 '21 14:08 kamil4

. Unsorted contains all photos that are not in an album, both public and private.

I was imagining an access check. But I still think the better solution is to use albums.

d7415 avatar Aug 05 '21 14:08 d7415

Yes, I'm generally not a big fan of either Unsorted or Public... As far as I'm concerned, they serve little useful purpose and their semantics is confusing to users.

kamil4 avatar Aug 05 '21 14:08 kamil4

I think this is fixed with the lastest changes by @kamil4 on Front-end. @kamil4 Do you confirm?

ildyria avatar Nov 23 '21 11:11 ildyria

Error 2 should be fixed. Error 1 is more of a new feature request, and it hasn't been addressed.

kamil4 avatar Nov 23 '21 15:11 kamil4

To @Gaibhne: We recently had the same question wrt. error 1 on gitter. I simply post the explanation here in case someone stumbles across the same problem:

The "Public" folder is one of the most misunderstood feature of Lychee. The "Public" is not meant to be public. The "Public" folder is meant to be more a sort of control and audit feature which allows to check for public photos from a central point and therewith spot photos which might be public accidentally. Also note that the "Public" folder does not list all publicly visible photos. There are two reasons why a photo may be publicly visible: it is part of an parent album which is publicly visible and therewith publicly visible, too, or the photo is made publicly visible on its own terms. The "Public" folder only lists the the latter category of publicly visible photos, i.e. photos which are made public explicitly.

@kamil4 wrote:

Error 2 should be fixed. Error 1 is more of a new feature request, and it hasn't been addressed.

Completely agreed. The question is whether we want to close the issue anyway.

Of course, we could implement a public "Public" album quite easily. However, I wonder if this would be reasonable. A public "Public" album which really contains all public photos (even those from public albums) would become quite large even on medium-sized installation and be a true performance bottleneck.

Maybe we should just rename the current "Public" album to something which does not confuse users. But I have no good suggestion.

nagmat84 avatar Nov 23 '21 17:11 nagmat84