You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2021. It is now read-only.
After upgrading from an older version (3.1.xxx) to 3.2.12, most seemed to work fine, but some albums refused to open.
Some albums open fine, others won't.
The console of the browser would show the response failed with 'Bad Gateway'. Eventually finding the logs (linuxserver/lychee docker image used for running the app) it showed multiple lines likes this:
PHP message: PHP Notice: Undefined index: size in /usr/share/webapps/lychee/php/Modules/Photo.php on line 812
Looking at my database, the 'size' column exists and is filled (NOT NULL) for all my photos.
Looking at line 812 of the Photo.php module I see this line:
fixes the problem and refreshing the album, it now loads!
Digging a bit deeper, that error line is in the function Photo::prepareData() and it gets called from Modules/Album.php:173. There is a switch statement before that (around line 130 in Album.php ) where a query gets picked and executed, selecting fields from the photos-table. There is no size column in those SELECT statements. Adding it in (and undoing the change made to Photo.php) also works and the album loads fine.
Steps to reproduce the issue
I don't know why some albums worked and others didn't. Maybe cache related, or maybe it depends on the query picked to get information. If it's a SELECT * then it worked, if it hand-picked columns to query and size wasn't included, it gave errors. I think something like that.
Output of the diagnostics (Settings => Diagnostics)
Diagnostics report everything OK and 'should be working', except for an empty Dropbox key which I don't use.
Browser and system
I tried with Firefox 65, Windows x64.
Like I said, for running Lychee it's running the linuxserver/lychee docker images. So if the sourcecode I mentioned doesn't make sense and seems old or messy, then it might be that the people maintaining that docker image made a booboo or started messing with the code.
The text was updated successfully, but these errors were encountered:
I was unable to reproduce it, but it looks like it should cause an error. I applied your suggested fix to Album.php instead of Photo.php as it should be more complete that way.
Thanks for reporting this and for doing the debugging for us 👍
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
After upgrading from an older version (3.1.xxx) to 3.2.12, most seemed to work fine, but some albums refused to open.
Some albums open fine, others won't.
The console of the browser would show the response failed with 'Bad Gateway'. Eventually finding the logs (linuxserver/lychee docker image used for running the app) it showed multiple lines likes this:
Looking at my database, the 'size' column exists and is filled (NOT NULL) for all my photos.
Looking at line 812 of the Photo.php module I see this line:
Replacing it with this:
fixes the problem and refreshing the album, it now loads!
Digging a bit deeper, that error line is in the function
Photo::prepareData()
and it gets called fromModules/Album.php:173
. There is a switch statement before that (around line 130 inAlbum.php
) where a query gets picked and executed, selecting fields from the photos-table. There is nosize
column in those SELECT statements. Adding it in (and undoing the change made to Photo.php) also works and the album loads fine.Steps to reproduce the issue
I don't know why some albums worked and others didn't. Maybe cache related, or maybe it depends on the query picked to get information. If it's a
SELECT *
then it worked, if it hand-picked columns to query andsize
wasn't included, it gave errors. I think something like that.Output of the diagnostics (Settings => Diagnostics)
Diagnostics report everything OK and 'should be working', except for an empty Dropbox key which I don't use.
Browser and system
I tried with Firefox 65, Windows x64.
Like I said, for running Lychee it's running the
linuxserver/lychee
docker images. So if the sourcecode I mentioned doesn't make sense and seems old or messy, then it might be that the people maintaining that docker image made a booboo or started messing with the code.The text was updated successfully, but these errors were encountered: