Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only one photo shows in gallery after migration from v3. #488

Closed
StefanescuCristian opened this issue Apr 19, 2020 · 5 comments · Fixed by #489
Closed

Only one photo shows in gallery after migration from v3. #488

StefanescuCristian opened this issue Apr 19, 2020 · 5 comments · Fixed by #489

Comments

@StefanescuCristian
Copy link

StefanescuCristian commented Apr 19, 2020

Detailed description of the problem

A clear and concise description of what the bug is.
After upgrading and migrating only one photo appears in the new v4 site. The albums are shown, but are empty. I have almost 300 photos uploaded and moved from v3, so the photos are there, but they don't show in the site.

Steps to reproduce the issue

Steps to reproduce the behavior:
I think that this is a problem with my installation only.
When I ran php artisan migrate it gave me this error:


In 2018_08_15_103716_move_photos.php line 76:

  getimagesize(/var/www/html/photos.linux365.ro/public/uploads/small/50ae033fd8a3e92f0fa92cb128879d14.jpg): failed to open stream: No such file or directory
 

I don't know why the file didn't exist in v3 small folder, but it existed in medium folder so I copied it to small folder. I ran again php artisan migrate and it found another missing file, that I copied from the medium folder to small folder, and then ran it again without problems.

Migrating: 2018_08_15_103716_move_photos
Migrated:  2018_08_15_103716_move_photos (0.2 seconds)
Migrating: 2018_10_30_135411_sharing
Migrated:  2018_10_30_135411_sharing (2.89 seconds)
Migrating: 2019_02_21_114356_create_pages_table
Migrated:  2019_02_21_114356_create_pages_table (0.42 seconds)
Migrating: 2019_02_21_114408_create_page_contents_table
Migrated:  2019_02_21_114408_create_page_contents_table (2.3 seconds)
Migrating: 2019_06_21_180451_create_sym_links_table
Migrated:  2019_06_21_180451_create_sym_links_table (0.54 seconds)
Migrating: 2019_09_28_171753_config_fix
Migrated:  2019_09_28_171753_config_fix (6.31 seconds)
Migrating: 2019_09_28_190822_photos_fix
Migrated:  2019_09_28_190822_photos_fix (2.95 seconds)
Migrating: 2019_10_01_add_livephoto_cols
Migrated:  2019_10_01_add_livephoto_cols (3.64 seconds)
Migrating: 2019_10_02_1400_config_map_display_public
Migrated:  2019_10_02_1400_config_map_display_public (0.07 seconds)
Migrating: 2019_10_03_214750_frame_refresh_in_sec
Migrated:  2019_10_03_214750_frame_refresh_in_sec (0.08 seconds)
Migrating: 2019_10_06_1400_config_map_providers
Migrated:  2019_10_06_1400_config_map_providers (0.08 seconds)
Migrating: 2019_10_06_152017_add_force_32bit_ids
Migrated:  2019_10_06_152017_add_force_32bit_ids (0.02 seconds)
Migrating: 2019_10_07_0900_config_map_include_sub_albums
Migrated:  2019_10_07_0900_config_map_include_sub_albums (0.14 seconds)
Migrating: 2019_10_09_233402_config_map_mod
Migrated:  2019_10_09_233402_config_map_mod (0.03 seconds)
Migrating: 2019_10_11_093442_config_check_update_every
Migrated:  2019_10_11_093442_config_check_update_every (0.06 seconds)
Migrating: 2019_12_02_2100_config_exiftool
Migrated:  2019_12_02_2100_config_exiftool (0.02 seconds)
Migrating: 2019_12_15_0700_add_share_button_visible_option
Migrated:  2019_12_15_0700_add_share_button_visible_option (1.12 seconds)
Migrating: 2019_12_15_1000_config_check_update_every_cat_fix
Migrated:  2019_12_15_1000_config_check_update_every_cat_fix (0.02 seconds)
Migrating: 2019_12_25_0600_config_exiftool_ternary
Migrated:  2019_12_25_0600_config_exiftool_ternary (0.09 seconds)
Migrating: 2020_01_018_2300_config_import_via_symlink
Migrated:  2020_01_018_2300_config_import_via_symlink (0.02 seconds)
Migrating: 2020_01_04_1200_config_has_ffmpeg
Migrated:  2020_01_04_1200_config_has_ffmpeg (0.03 seconds)
Migrating: 2020_01_26_1200_config_public_sorting
Migrated:  2020_01_26_1200_config_public_sorting (0.07 seconds)
Migrating: 2020_01_28_133201_composer_update
Migrated:  2020_01_28_133201_composer_update (0.07 seconds)
Migrating: 2020_02_14_0600_location_decoding
Migrated:  2020_02_14_0600_location_decoding (1.07 seconds)
Migrating: 2020_03_11_124417_increase_length_photo_type
Migrated:  2020_03_11_124417_increase_length_photo_type (0.05 seconds)
Migrating: 2020_03_17_200000_unhide_configs
Migrated:  2020_03_17_200000_unhide_configs (0.08 seconds)
Migrating: 2020_04_19_122905_bump_version
Migrated:  2020_04_19_122905_bump_version (0.02 seconds)
Migrating: 2064_12_25_0000_generate_installed_log
Migrated:  2064_12_25_0000_generate_installed_log (0.02 seconds)

Now, the only photo that is displayed is the first one that I copied from medium to small folder.

Output of the diagnostics

(I think that this is irrelevant, but here you go)


    Diagnostics
    -------
    Warning: Dropbox import not working. dropbox_key is empty.




    System Information
    --------------
    Lychee-front Version:      -
    Lychee Version (git):      49d5862 (master) - Data not in Cache
    DB Version:                040001
    System:                    Linux
    PHP Version:               7.4
    MySQL Version:             5.7.29-0ubuntu0.18.04.1
    
    Imagick:                   1
    Imagick Active:            1
    Imagick Version:           1687
    GD Version:                2.2.5
    
    Lychee total space:        2.76 GB
    Upload folder space:       2.70 GB
    System total space:        96.94 GB
    System free space:         74.67 GB (77%)




    Config Information
    --------------
    version:                   040001
    check_for_updates:         1
    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:        exif
    default_license:           CC-BY-NC-ND
    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:             Cristian Stefanescu
    landing_title:             Cristian Stefanescu
    landing_subtitle:          Photography
    landing_facebook:          https://www.facebook.com/JohnSmith
    landing_flickr:            https://www.flickr.com/JohnSmith
    landing_twitter:           https://www.twitter.com/JohnSmith
    landing_instagram:         https://instagram.com/JohnSmith
    landing_youtube:           https://www.youtube.com/JohnSmith
    landing_background:        dist/cat.jpg
    site_title:                Linux365 Photos Gallery
    site_copyright_enable:     1
    site_copyright_begin:      2010
    site_copyright_end:        2020
    additional_footer_text:    
    display_social_in_gallery: 0
    public_search:             1
    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:        1
    map_provider:              Wikimedia
    force_32bit_ids:           0
    map_include_subalbums:     0
    update_check_every_days:   3
    has_exiftool:              1
    share_button_visible:      0
    import_via_symlink:        0
    has_ffmpeg:                0
    location_decoding:         1
    location_decoding_timeout: 30
    location_show:             1
    location_show_public:      1

Logs from Settings->Show Logs

    2020-04-19 16:15:48 -- notice  -- App\ModelFunctions\SessionFunctions::log_as_admin -- 138 -- User (admin_photos) has logged in from 188.211.235.187
    2020-04-19 15:49:05 -- warning -- GenerateInstalledLog::up -- 18 -- Installation completed.
    2020-04-19 15:48:41 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:48:41 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:48:41 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !
    2020-04-19 15:48:25 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:48:24 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:48:24 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !
    2020-04-19 15:45:56 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:45:56 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:45:56 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !
    2020-04-19 15:45:52 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:45:52 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:45:52 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !
    2020-04-19 15:44:25 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:44:25 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:44:25 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !
    2020-04-19 15:42:14 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:42:14 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:42:14 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !
    2020-04-19 15:41:20 -- error   -- App\Configs::get_value -- 173 -- update_check_every_days does not exist in config (local) !
    2020-04-19 15:41:20 -- error   -- App\Configs::get_value -- 173 -- imagick does not exist in config (local) !
    2020-04-19 15:41:20 -- error   -- App\Configs::get_value -- 173 -- compression_quality does not exist in config (local) !

Browser and system

Irrelevant, but I've tested FIrefox Nightly and Safari on a Mac. The server is running what you can see in the diagnostics attached.

@StefanescuCristian
Copy link
Author

I copied all the files from medium folder to small folder and run php artisan migrate:refresh.
Maybe this should be in the documentation somewhere if the migration fails you can redo it by running php artisan migrate:refresh

@ildyria
Copy link
Member

ildyria commented Apr 19, 2020

You should not have copied the full folder from medium to small, that is completely semantically wrong. I will try to figure out what went wrong.

@ildyria
Copy link
Member

ildyria commented Apr 19, 2020

Thank you for bringing that up though.

@StefanescuCristian
Copy link
Author

I only copied the missing files. In know it defeats the purpose of having smaller thumbs, but I got it working.

Looking in my backups I see that particular missing file was never in the small folder, so probably something went wrong a long time ago.

┌─[cristi @ bkp] - [/storage/backup/web/www]
└─[20/04/19 - 18:47:07]─[ > ]find -name '50ae033fd8a3e92f0fa92cb128879d14.jpg'
./2019-09-08-22:12:16/html/photos.linux365.ro/uploads/big/50ae033fd8a3e92f0fa92cb128879d14.jpg
./2019-09-08-22:12:16/html/photos.linux365.ro/uploads/medium/50ae033fd8a3e92f0fa92cb128879d14.jpg
./2019-09-09-00:17:01/html/photos.linux365.ro/uploads/big/50ae033fd8a3e92f0fa92cb128879d14.jpg
./2019-09-09-00:17:01/html/photos.linux365.ro/uploads/medium/50ae033fd8a3e92f0fa92cb128879d14.jpg

@ildyria
Copy link
Member

ildyria commented Apr 20, 2020

Found where the error was...

@ildyria ildyria mentioned this issue Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants