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

[BUG] Switching to another person/album shows assets from the previous person/album #3823

Closed
1 of 3 tasks
daniele-athome opened this issue Aug 21, 2023 · 4 comments
Closed
1 of 3 tasks
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer

Comments

@daniele-athome
Copy link
Contributor

The bug

If you go to the asset grid view for a person, try to open an asset and choose another person in the photo, you'll be taken back to the asset grid view for the new person, but the assets will still be from the previous person.

Refreshing the page works around the issue.

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.74.0

Version of Immich Mobile App

(not applicable)

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

(not applicable)

Your .env content

(not applicable)

Reproduction steps

1. go to the Explore page and click on a person
2. from the assets grid view, click an asset to open it
3. open the info panel and click on another person that appears in the photo
4. you'll see the header for the new person, but the assets from the old person

Additional information

No response

@daniele-athome daniele-athome added bug Something isn't working needs triage Bug that needs triage from maintainer labels Aug 21, 2023
@daniele-athome
Copy link
Contributor Author

I just discovered that the same issue (although I don't know if they are related, just guessing) happens with albums:

  1. open an album
  2. open an asset
  3. add asset to shared album
  4. create a shared album to add the asset to
  5. the view will switch to the new shared album, but the assets inside are the ones from the previous album

@daniele-athome
Copy link
Contributor Author

daniele-athome commented Sep 2, 2023

This is apparently a Svelte issue. It happens with every navigation between routes that share the same parameterized URL.

This seems to be serious upstream:

sveltejs/kit#1497
sveltejs/kit#552
sveltejs/kit#5007

@daniele-athome daniele-athome changed the title [BUG] Switching to another person shows assets from the previous person [BUG] Switching to another person/album shows assets from the previous person/album Sep 2, 2023
daniele-athome added a commit to daniele-athome/immich that referenced this issue Sep 2, 2023
@daniele-athome
Copy link
Contributor Author

daniele-athome commented Sep 2, 2023

I found a very ugly way to workaround the Svelte bug, but I'm not fluent enough on Svelte, so any Svelte expert willing to lend a hand here would be super nice :-)

daniele-athome@ba7a8af

The key is adding the #key block around the AssetGrid otherwise the grid will be stuck on loading mode (why doesn't it detect the change automatically and rebuilds everything? As I said, I don't know Svelte very well). But I'm sure there is a better way to do this, there's probably something to be modified in AssetGrid too.

@daniele-athome
Copy link
Contributor Author

daniele-athome commented Sep 21, 2023

Fixed with the workaround in #4089.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer
Projects
None yet
Development

No branches or pull requests

1 participant