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

Albums or photos are incorrectly set after migration from Lychee v3.x #927

Closed
elvisef opened this issue Feb 15, 2021 · 7 comments · Fixed by #928
Closed

Albums or photos are incorrectly set after migration from Lychee v3.x #927

elvisef opened this issue Feb 15, 2021 · 7 comments · Fixed by #928
Assignees
Labels
bug Something isn't working

Comments

@elvisef
Copy link
Contributor

elvisef commented Feb 15, 2021

Detailed description of the problem [REQUIRED]

I have some albums set to be: public, hidden, and protected with pass (with Lychee v3).
But it does not work properly, without changes.

If I click "unpublish" and "publish" again, it works as expected with certain settings.
But without it, v3 settings for albums does not work.
The first effect, after loading certaing public hidden album v3 is that there is no pass popup, just all images are shown.

Next time, I tried to disable "original images" or set password (pass was set in v3 version, here there was no indication of that setting - just like the pass was not set), images disappeared completely.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Go to album that was set with settings, ex. pass, public, hidden etc.. in v3 version of Lychee
  2. Do nothing - just copy the URL
  3. Go to ex. incognito window
  4. Load URL - see what happens..

Screenshots
database - sample album, set with Lychee v3, I did not changed anything here:
firefox_GWfTya4wtr
firefox_4Y78PHhvUV

photos from this album:
firefox_H7nP3AEEXv
firefox_JpCIiAA6re
firefox_ADnPk0fFnZ

Output of the diagnostics [REQUIRED]

Not required I think.

Browser and system

OS: Win7 PRO
Browser: Firefox 85.0.2 (64 bity)

@elvisef elvisef changed the title Albums are incorrectly set after migration from Luychee v3.x Albums or photos are incorrectly set after migration from Luychee v3.x Feb 15, 2021
@elvisef elvisef changed the title Albums or photos are incorrectly set after migration from Luychee v3.x Albums or photos are incorrectly set after migration from Lychee v3.x Feb 15, 2021
@kamil4
Copy link
Contributor

kamil4 commented Feb 16, 2021

Looking at the source code:

DB::table('albums')->insert([
'id' => $id,
'title' => $result->title,
'description' => $result->description,
'public' => $result->public,
'visible_hidden' => $result->visible,
'license' => $result->license ?? 'none',
'created_at' => date('Y-m-d H:i:s', $result->sysstamp),
]);

I can confirm that passwords aren't being copied between the v3 and v4 albums. I'm not sure why -- perhaps the password encoding schemes are incompatible between the two? @ildyria?

@kamil4
Copy link
Contributor

kamil4 commented Feb 16, 2021

It looks like they both use bcrypt...

@kamil4 kamil4 self-assigned this Feb 16, 2021
@kamil4 kamil4 added the bug Something isn't working label Feb 16, 2021
@kamil4
Copy link
Contributor

kamil4 commented Feb 16, 2021

OK, this will get fixed, but it won't affect you since your albums have already been migrated. What I mean by that is that you would have to start from v3 again to benefit from the fix.

@elvisef
Copy link
Contributor Author

elvisef commented Apr 29, 2021

Alright, I understand. I will need to do it manually : )
I hope the "save" button will work out of the box.

Edit: Just saving using a button did not help. It did not, because the "secured" option is disabled when entering album options (v3 migrated and secured with password album). So I need to enter a new password and then save.
firefox_2021-04-29_08-42-45

@ildyria ildyria reopened this Apr 29, 2021
@ildyria
Copy link
Member

ildyria commented Apr 29, 2021

It seems we need to copy an additional data :(

@kamil4
Copy link
Contributor

kamil4 commented Apr 29, 2021

I'm not sure what the issue is?

We are talking about albums that were migrated from v3 before #928 was merged, correct? In that case the passwords weren't copied, so indeed in order to re-enable the passwords one needs to check the Password protected box and then enter the password in the input field that appears. This is how it's supposed to work.

@elvisef
Copy link
Contributor Author

elvisef commented Apr 30, 2021

Yes. I just wrote it in order to remember to let know other users in the FAQ or wherever, if they have problems as in my case.
I have nothing else to say here though : )

@kamil4 kamil4 closed this as completed Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants