docs icon indicating copy to clipboard operation
docs copied to clipboard

Emails contain document links to example.com

Open z3ntu opened this issue 3 months ago • 6 comments

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 &quot;bewerker&quot; 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 &quot;bewerker&quot; 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

z3ntu avatar Sep 15 '25 21:09 z3ntu

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 ;)

kosssi avatar Sep 16 '25 22:09 kosssi

Indeed that seems to work now, thank you!

Image

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.

z3ntu avatar Sep 17 '25 16:09 z3ntu

@unteem is it? What's your take on this ?

virgile-dev avatar Sep 19 '25 09:09 virgile-dev

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 ?

AntoLC avatar Sep 19 '25 10:09 AntoLC

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.

lunika avatar Sep 23 '25 07:09 lunika

@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, ...).

hrenard avatar Sep 23 '25 10:09 hrenard