Direct Links of albums do not respect url if lychee installed in subdirectory
Detailed description of the problem [REQUIRED]
If Lychee is installed in a subdirectory and not at root top level of the website (aka instead of mywebsite.com it's accessible in mywebsite.com/pics), the Album share direct link does not include the subdirectory
Steps to reproduce the issue
Steps to reproduce the behavior: 1.Install lychee in /pics (which is not available to apache) 2. ln -s /pics/public /www/pics (/www is toplevel of mywebsite.com served by apache) 3. edit .env APP_URL=https://mywebsite.com/pics 4. continue with normal install/configure of lychee from webbrowser pointed at mywebsite.com/pics 5. Create an album 6. in the album pick share->direct link. Expected URL is mywebsite.com/pics/r/xxxxxxxxxx , given URL is mywebsite.com/r/xxxxxxxxxxxxx
Screenshots
View for yourself at https://snyderworld.org/pics pick any album and share->direct link and the URL won't include the /pics. SOmething I messed up? or a bug? If you pick individual pictures share direct links the URL includes the /pics as expected.
Output of the diagnostics [REQUIRED]
Diagnostics
Warning: Using 32 bit PHP, recommended upgrade to 64 bit Error: PHP zip extension not activated Warning: Dropbox import not working. dropbox_key is empty.
System Information
Lychee Version (release): 4.0.8 DB Version: 4.0.8
composer install: --no-dev APP_ENV: production APP_DEBUG: false
System: AIX PHP Version: 7.4 Max uploaded file size: 500M Max post size: 500M SQLite Version: 3.32.3
Imagick: 1 Imagick Active: 1 Imagick Version: 1802 GD Version: bundled (2.1.0 compatible)
Config Information
version: 040008
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: 1
image_overlay_type: desc
default_license: none
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: Snyderworld.org
landing_title: Snyderworld.org
landing_subtitle: Everything
landing_facebook: https://www.facebooksucks.com
landing_flickr: https://www.flickrsucks.com
landing_twitter: https://www.twittersucks.com
landing_instagram: https://instagramsucks
landing_youtube: https://www.googleisevil.com
landing_background: dist/cat.jpg
site_title: Lychee v4
site_copyright_enable: 1
site_copyright_begin: 1994
site_copyright_end: 2020
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: 0
zip64: 1
map_display_public: 0
map_provider: Wikimedia
force_32bit_ids: 0
map_include_subalbums: 0
update_check_every_days: 3
has_exiftool: 0
share_button_visible: 0
import_via_symlink: 0
has_ffmpeg: 1
location_decoding: 0
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
Browser and system
Client is Win 10 w/firefox 83.0 Server is AIX 7.2
===================
Only the album share link is wrong. Individual picture share link is correct and includes the /pics in the URL path as expected.
View for yourself at https://snyderworld.org/pics pick any album and share->direct link and the URL won't include the /pics. SOmething I messed up? or a bug? If you pick individual pictures share direct links the URL includes the /pics as expected.
@73blazer thank you for the report, sorry for the delay. Could you check if this is fixed on the master branch?
As I see that you are using the release channel, you can download that file: https://github.com/LycheeOrg/Lychee/blob/master/public/dist/main.js
And place it in the folder public/dist to overwrite your current version. It should hopefully fix the bug.
Yup, problem solved with the new main.js. Thanks!
Error Still exists in master (63b9a50)
Generating of direct link e.g. https://mysite.com/photos/r/0XNxguyya3K4f7w results after clicking this link to: https://mysite.com/#0XNxguyya3K4f7w - so the subdirectory is cut off