[BUG] State not correctly persisted in URL #920

Closed
opened 2026-02-04 23:34:21 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @wittymap on GitHub (Jun 7, 2023).

Originally assigned to: @jrasm91 on GitHub.

The bug

On the web client, the current state of the view is not correctly persisted in the URL in some areas of the UI, making it impossible to bookmark individual photos in the web browser. It's fairly inconsistent across different aspects of the UI. In some areas of the UI, it works correctly.

Areas where the site works well, and the state is persisted

  • When searching for a face, the face is a link to /people/<person-id>. This one works and yields the expected behavior - a page that if refreshed brings you back to the same page.
  • When searching for an object, the URL switches to /search?smartInfo.objects=<object-title>.

Where it doesn't work as expected (the bug)

  • When viewing a photo in an album, the browser URL switches to /albums/<album-id>/photos/<photo-id>. However, if the page is refreshed, it instead redirects you back to /albums/<album-id>. Expected behavior: refreshing the page from /albums/<album-id>/photos/<photo-id> brings you right back to the photo you were viewing before.
  • When viewing a photo from the main timeline, the url stays at /photos, even when a photo is being viewed. Expected behavior: When viewing a photo, the url switches to /photos/<photo-id> and if the page is refreshed it brings you right back to the photo.
  • When searching for a string, the url on the results page is /photos. Expected behavior: URL switches to something else (like /search/query) and if the page is refreshed it brings you right back to the same search results.
  • When clicking on an item from the map, the url stays at /map. Expected behavior: URL switches to /map/photos/<photo-id> (or something else that persists state).

And where it really doesn't work and errors out (another bug).

When clicking on a photo from the favorites or archive page, the URL switches to /favorites/photos/<photo-id> (or /archive/photos/<photo-id>. If the page is refreshed from this, an error is shown to the user:

Error: Not found: /favorites/photos/<photo-id>
    at resolve (file:///usr/src/app/build/server/index.js:3861:18)
    at resolve (file:///usr/src/app/build/server/index.js:3736:34)
    at Object.handle (file:///usr/src/app/build/server/chunks/hooks.server-5df290a2.js:21:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async respond (file:///usr/src/app/build/server/index.js:3734:22)
    at async Array.ssr (file:///usr/src/app/build/handler.js:1207:3)

The OS that Immich Server is running on

Windows 10

Version of Immich Server

v1.60.0

Version of Immich Mobile App

n/a

Platform with the issue

  • Server
  • Web
  • Mobile
Originally created by @wittymap on GitHub (Jun 7, 2023). Originally assigned to: @jrasm91 on GitHub. ### The bug On the web client, the current state of the view is not correctly persisted in the URL in some areas of the UI, making it impossible to bookmark individual photos in the web browser. It's fairly inconsistent across different aspects of the UI. In some areas of the UI, it works correctly. ## Areas where the site works well, and the state is persisted - When searching for a face, the face is a link to `/people/<person-id>`. This one works and yields the expected behavior - a page that if refreshed brings you back to the same page. - When searching for an object, the URL switches to `/search?smartInfo.objects=<object-title>`. ## Where it doesn't work as expected (the bug) - When viewing a photo in an album, the browser URL switches to `/albums/<album-id>/photos/<photo-id>`. However, if the page is refreshed, it instead redirects you back to `/albums/<album-id>`. Expected behavior: refreshing the page from `/albums/<album-id>/photos/<photo-id>` brings you right back to the photo you were viewing before. - When viewing a photo from the main timeline, the url stays at `/photos`, even when a photo is being viewed. Expected behavior: When viewing a photo, the url switches to `/photos/<photo-id>` and if the page is refreshed it brings you right back to the photo. - When searching for a string, the url on the results page is `/photos`. Expected behavior: URL switches to something else (like `/search/query`) and if the page is refreshed it brings you right back to the same search results. - When clicking on an item from the map, the url stays at `/map`. Expected behavior: URL switches to `/map/photos/<photo-id>` (or something else that persists state). ## And where it really doesn't work and errors out (another bug). When clicking on a photo from the favorites or archive page, the URL switches to `/favorites/photos/<photo-id>` (or `/archive/photos/<photo-id>`. If the page is refreshed from this, an error is shown to the user: ``` Error: Not found: /favorites/photos/<photo-id> at resolve (file:///usr/src/app/build/server/index.js:3861:18) at resolve (file:///usr/src/app/build/server/index.js:3736:34) at Object.handle (file:///usr/src/app/build/server/chunks/hooks.server-5df290a2.js:21:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async respond (file:///usr/src/app/build/server/index.js:3734:22) at async Array.ssr (file:///usr/src/app/build/handler.js:1207:3) ``` ### The OS that Immich Server is running on Windows 10 ### Version of Immich Server v1.60.0 ### Version of Immich Mobile App n/a ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile
OVERLORD added the 🗄️server🖥️web labels 2026-02-04 23:34:21 +03:00
Author
Owner

@uhthomas commented on GitHub (Jul 11, 2023):

Related #2906.

@uhthomas commented on GitHub (Jul 11, 2023): Related #2906.
Author
Owner

@alextran1502 commented on GitHub (Apr 27, 2024):

#8532

@alextran1502 commented on GitHub (Apr 27, 2024): #8532
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#920