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

Closed
opened 2026-02-05 01:04:53 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @daniele-athome on GitHub (Aug 21, 2023).

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

Originally created by @daniele-athome on GitHub (Aug 21, 2023). ### 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 - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML (not applicable) ``` ### Your .env content ```Shell (not applicable) ``` ### Reproduction steps ```bash 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_
Author
Owner

@daniele-athome commented on GitHub (Aug 31, 2023):

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 commented on GitHub (Aug 31, 2023): 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
Author
Owner

@daniele-athome commented on GitHub (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:

https://github.com/sveltejs/kit/issues/1497
https://github.com/sveltejs/kit/issues/552
https://github.com/sveltejs/kit/discussions/5007

@daniele-athome commented on GitHub (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: https://github.com/sveltejs/kit/issues/1497 https://github.com/sveltejs/kit/issues/552 https://github.com/sveltejs/kit/discussions/5007
Author
Owner

@daniele-athome commented on GitHub (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 :-)

ba7a8af0d1

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 commented on GitHub (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 :-) https://github.com/daniele-athome/immich/commit/ba7a8af0d182d2f1fbeccc4c5508cf6e91e30866 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.
Author
Owner

@daniele-athome commented on GitHub (Sep 21, 2023):

Fixed with the workaround in #4089.

@daniele-athome commented on GitHub (Sep 21, 2023): Fixed with the workaround in #4089.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1264