8000 Avatars won't display if the app is migrated to a different sub-path · Issue #1776 · wekan/wekan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Avatars won't display if the app is migrated to a different sub-path #1776
Closed
@zypA13510

Description

@zypA13510

Issue

Server Setup Information:

  • Did you test in newest Wekan?: yes
  • Wekan version: 1.18.0
  • Operating System: CentOS 7 (3.10.0-862.el7.x86_64)
  • Deployment Method(snap/docker/sandstorm/mongodb bundle/source): snap
  • ROOT_URL environment variable http(s)://(subdomain).example.com(/suburl):

Problem description:
When migrating Wekan to a new host, the user avatar will become inaccessible, HTTP status 404. Using the ROOR_URL above, the src attribute of the <img> tag is always pointed to /wekan/cfs/files/avatars/RandomString/filename.jpg (removing the /wekan part from Chrome Dev Tools after migration will load the image correctly).

When viewing the data from mongo CLI, I discovered that the sub-path is stored into the DB:

> use wekan
> db.users.find()
{
    ...
    "profile" : {
        ...
        "avatarUrl" : "/wekan/cfs/files/avatars/_________________/____.jpg",
        ...
    },
    ...
}

Interestingly, also stored in /cfs, attachments work fine after migration. If the attachment is an image file, the preview loads correctly.

Maybe related to #386, #973.

Steps to reproduce:

  1. Set up Wekan-snap using the old ROOT_URL above.
  2. Perform a DB backup wekan-snap backup and restore
  3. Set up Wekan-docker (or probably another Wekan-snap, not tested) with the new ROOT_URL
  4. Perform a DB restore wekan-docker export mongo data

Workaround:
Not tested yet, but theoretically, one can use the mongo CLI to replace the old sub-path with RegExp. Ref

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0