Closed RobStallion closed 6 years ago
I have updated the env variable
on heroku but we will not see any change until the app has been redeployed.
The last version of master that was pushed to production is here. If we branch off at this point and then deploy the new branch to production it should pick up the new env variable.
We may need to commit to the branch in order for it to update on heroku, not sure about this yet. If we do need to commit we can just do an empty commit for now, e.g. git commit --allow-empty -m "rebuild app"
.
Has anyone had an issue similar to this in the past?
I think redeploying with an empty commit is probably the best thing to do.
This thread looks like it documents a similar issue, but seems to have some conflicting information on how config variables are set. It looks like it could even possibly be the buildpack rather than elixir itself causing the issue. (Although I think you said you'd manage to reproduce it locally so maybe not).
I could recreate the issue locally. I should have mentioned that in the issue sorry. Thanks for spotting that and for your reply @Danwhy 👍. I will take a look at the thread now
Thanks @Danwhy and @iteles for your feedback on this issue.
We decided to wait till sprint 8 was ready to be deployed to production and used that to rebuild the application and get the correct env variable.
When a user tries to reset their password using the production version of the site, they receive their email but the link does not work. It takes them to a page with a message saying that they site cannot be reached.
This appears to be because the
env variable
that was defined as the url to direct a user to in production is missing thewww.
.Normally this would be a simple fix, all that would need to be done is update the
env variable
on heroku. However, due to how the variable is being set in the application, it is not updating when it is changed on heroku.The base_url is currently being stored as a 'constant' using a module attribute, see code here. Because these values are read at compilation time, and not at runtime, when the app was originally compiled the constant was saved as the incorrect value that was stored on heroku.
In order for this to be fixed the app will need to be redeployed (see this SO question and the article it links to for more info on this).