Skip to content

Memory detail page: map/photos never load — window.reittiCustomMapStyles is undefined (Invalid map type) #1121

Description

@Leppi83

Description

On the Memory/Journey detail page (/memories/{id}), the map and photo grid never load — they stay stuck in an infinite loading spinner state. The main Timeline/Map dashboard works perfectly fine; this only affects the memory detail view.

Photos are pulled in via the Immich integration, which works correctly elsewhere (the photo picker/editor for selecting which photos belong to a day shows the full Immich library fine) — it's specifically the memory detail view's rendering that's stuck.

I couldn't find an existing issue matching this exact symptom, so apologies if this is a duplicate or something specific to my setup — happy to provide more detail if this doesn't reproduce for others.

Steps to reproduce

  1. Self-hosted via Docker Compose, dedicatedcode/reitti:latest (image pulled 2026-07-13).
  2. Open any existing Memory/Journey (/memories/{id}).
  3. Map never renders, photo thumbnails spin forever.

Browser console error

Uncaught Error: Invalid map type
    at MapRenderer.getMapStyleValue (map-renderer.js:122:19)
    at new MapRenderer (map-renderer.js:183:32)
    at initializeMemoryMap (memories page inline script)

A second, similar error is thrown from initializeMapForBlock as well.

Root cause (as far as I could trace it)

MapRenderer.getMapStyle() falls back to getMapStyles()[0] when the requested style id isn't found, and getMapStyles() returns MapRenderer.getCustomMapStyles(), which reads window.reittiCustomMapStyles. On the memory detail page, window.reittiCustomMapStyles is undefined (confirmed via browser console), not even an empty array — so getMapStyle() returns undefined, and getMapStyleValue(undefined) throws.

This is not a "no map styles configured" issue — the user_map_styles table has valid entries (2 rows, one flagged default_style = true, map_type = vector, style_input_type = json), and the main Timeline/Map view renders correctly using them. The memory detail page template specifically appears to be missing whatever script tag/mechanism injects window.reittiCustomMapStyles on the other pages.

I also checked the application logs during reproduction — nothing at all is logged server-side (no exception, no error), which suggests the page renders "successfully" from the server's point of view but simply omits this script, rather than a caught/silent server-side failure.

Expected behavior

The memory detail page should render the map and load photos the same way the main Timeline view does.

Environment

  • Deployment: Docker Compose, dedicatedcode/reitti:latest + dedicatedcode/reitti-tile-cache:latest
  • Postgres/PostGIS: postgis/postgis:17-3.5-alpine
  • Auth: OIDC (Authentik), local login disabled
  • Photos: Immich integration (works fine elsewhere in the app)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions