Emails contain document links to example.com
Support request
Topic
In the email that docs sends that a document has been shared, the link in my installation points to example.com
<div style="font-family:Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size:16px;line-height:normal;text-align:left;color:#3A3A3A;">Foo ([email protected]) heeft u uitgenodigd met de rol "bewerker" op het volgende document:
<a href="example.com/docs/here-the-doc-uuid/">The document title</a>
</div>
The same in the plain text variant
Foo ([email protected]) heeft u uitgenodigd met de rol "bewerker" op het volgende document: The document title [example.com/docs/here-the-doc-uuid/]
Open [example.com/docs/here-the-doc-uuid/]
From what I can see this is coming from here, but I can't find where to configure this domain or make sure it matches the actual domain used. I also can't find where actually "example.com" comes from. Maybe from some dependency of docs?
https://github.com/suitenumerique/docs/blob/7f37d3bda4f821a0dc554e886aa5025c79bf2746/src/backend/core/models.py#L811
You should connect with administrator login on /admin/ page. On the page you can edit Sites and change value with your instance ;)
Don't forget to logout and restart your backend ;)
Indeed that seems to work now, thank you!
Two questions:
- Is this documented anywhere? Probably should be if it's not.
- Why does everything else not need this configuration? Can this be removed completely? We have a config and even the assets in the same email were pointing to the correct Domain so I don't see why these links would need special handling.
@unteem is it? What's your take on this ?
Why does everything else not need this configuration? Can this be removed completely? We have a config and even the assets in the same email were pointing to the correct Domain so I don't see why these links would need special handling.
I kind of agree, I suggest it once upon time. Should we harmonize this part with our setting system @lunika ?
Hi, Yes we have to remove the use of the django site framework. We only use it here. We can use a settings to have the instance url.
@unteem is it? What's your take on this ?
Hi,
We've also hit this issue at IndieHosters.
A stateless config via env var would indeed be better because we want to avoid manual steps to deploy an instance.
A DOMAIN env var cloud also be used to derive others url defaults (allowed host, public urls, ...).