Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Incorrect URLs in emails sent from API #597

Closed
Nitwel opened this issue Nov 18, 2018 · 17 comments
Closed

Incorrect URLs in emails sent from API #597

Nitwel opened this issue Nov 18, 2018 · 17 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Nitwel
Copy link
Member

Nitwel commented Nov 18, 2018

When requesting a password reset, the link directs to localhost and not to the api url.
I guess the image is also not showing because of that.

grafik

Directus 2.0.8

@rijkvanzanten rijkvanzanten transferred this issue from another repository Nov 18, 2018
@rijkvanzanten rijkvanzanten added the bug Something isn't working label Nov 18, 2018
@rijkvanzanten rijkvanzanten added this to To do in v2.0.9 via automation Nov 18, 2018
@aliuygur
Copy link

@wellingguzman we all waiting for you, where are you? :)

@benhaynes benhaynes added this to Needs triage in Bug Triage via automation Nov 19, 2018
@benhaynes
Copy link
Sponsor Member

It might be the path, or the logo might be missing too... either way let's also make sure that we're using the newest logo. I can provide it if needed...

@rijkvanzanten
Copy link
Member

I’m guessing the path to the logo is using the same wrong localhost @benhaynes 😉

@Nitwel
Copy link
Member Author

Nitwel commented Nov 20, 2018

As I said XD

@wellingguzman wellingguzman added enhancement New feature or request and removed bug Something isn't working labels Nov 21, 2018
@wellingguzman
Copy link
Contributor

The password reset url are based on the project_url setting in directus_settings.

Fixing this #502 (comment) issue was making this value hard default to http://localhost.

This should be improved to try to guess the url based on the request.

@benhaynes
Copy link
Sponsor Member

@wellingguzman @rijkvanzanten — let's get this one solved. Any ideas on the best way to get this path?

@Nitwel
Copy link
Member Author

Nitwel commented Dec 17, 2018

Also, #609 is related to the mail having wrong links ^^.

@benhaynes benhaynes changed the title wrong URL in password reset Incorrect URLs in emails sent from API Dec 18, 2018
@benhaynes benhaynes added bug Something isn't working help wanted Extra attention is needed and removed enhancement New feature or request labels Dec 18, 2018
@benhaynes benhaynes moved this from Low priority to High priority in Bug Triage Dec 18, 2018
@wellingguzman wellingguzman moved this from To do to In progress in v2.0.13 Dec 19, 2018
@wellingguzman
Copy link
Contributor

The problem with the logo is that the link to the getdirectus.com is broken.

I am going to fallback to the url based on the request instead of http://localhost that should solve this issue. If for some reason that's not the public-facing url of your project, you can set the project_url settings in the API (can be done in Admin Settings on the application).

Bug Triage automation moved this from High priority to Closed Dec 19, 2018
@wellingguzman
Copy link
Contributor

The API has not field for project_url, so you probably can't se this through the app Admin Settings.

But in directus_settings you can add a new item with key=project_url and set the value to your public facing url.

POST /<project>/settings

{
  "key": "project_url",
  "value": "https://my-domain.tld"
}

Otherwise it will fallback to the url based on the HTTP Request (guessing your url), the same way it guesses the uploaded files full URLs.

The Logo url has been updated to https://directus.io/img/assets/directus-white.png.

The URLs should be working as expected now. Otherwise let us know and we will reopen this ticket to address any issues with the new implementation.

@wellingguzman wellingguzman moved this from In progress to Done in v2.0.13 Dec 19, 2018
wellingguzman added a commit that referenced this issue Dec 19, 2018
@benhaynes
Copy link
Sponsor Member

@wellingguzman @rijkvanzanten — would it make sense to include this as a global setting in the App so it can be adjusted more easily?

@wellingguzman
Copy link
Contributor

@benhaynes I believe so, the option is there so it would make sense to add that field to the settings page.

I open a ticket for this: #670

wellingguzman added a commit that referenced this issue Dec 22, 2018
@wellingguzman
Copy link
Contributor

I added the field to to Directus Settings Fields.

I added that missing field the bottom of the form. I wonder if that looks ok, or should it be moved to the top, along with the project_name field (missing).

So it looks like this:

[ Project Name Input]
[ Project URL Input]
[ Logo Input]
[ Color Input]
[ Trusted Proxies Input]
[ Auto Sign Out]

If we want to have this conversation we could talk about otherwise, the field has been added by 4f82d08.

@benhaynes
Copy link
Sponsor Member

Gotcha. @rijkvanzanten — can we add this field into the App?

@wellingguzman
Copy link
Contributor

wellingguzman commented Dec 26, 2018

@benhaynes I don't know if @rijkvanzanten needs to do something on the app side, but this needs to be done in the API side. Add these fields records in the directus_fields in the seeder.

@benhaynes
Copy link
Sponsor Member

Oh, I thought you said it was already added. 😕

I'll re-open... but let's get this added (if it isn't already) and call it done!

@benhaynes benhaynes reopened this Dec 26, 2018
@wellingguzman
Copy link
Contributor

oh no, I added the project_url, which fixes this ticket.

I was referring to add the missing project_name and reorder the fields. (a new discussion)

@benhaynes
Copy link
Sponsor Member

👍

#676

samvasko pushed a commit to samvasko/api that referenced this issue Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Bug Triage
  
Closed
v2.0.13
  
Done
v2.0.9
  
To do
Development

No branches or pull requests

5 participants