Closed sjDCC closed 7 years ago
Not a bug. Installation-specific, needs a few configuration tweaks
where did the issue occur? dmponline-test or roadmap-stg and what config settings @vyruss ? An invalid token error sounds like the token has a lifespan and the login attempt was outside that boundary. So maybe its just too short a timespan?
This occurred on roadmap-stg. I think it may be because I had used that email temporarily. I had changed my account to that last week in testing and mis-remembered that, hence getting locked out when I uninstalled firefox and no longer had login details saved. I had changed it back so sent share plan invite to personal email today.
ok. I'll see if we can replicate it
Whoops, I assumed it was the wrong hostname issue (which isn't set up properly on dmponline-test yet). @briri I'm referring to config/environments/production.rb
:
config.action_mailer.default_url_options = { :host => 'my.hostname.here' }
After investigation, this looks like a bug: for some reason, the email that goes out contains a link to the shared plan, instead of an invitation link.
I've tried sharing a plan with an account that has already been created in the system but not yet validated and didn't get an error so I think this is now fixed on DMPonline. I couldn't full test on DMPRoadmap staging. I think you're maybe one PR behind @briri as the message text in the sharing email was different and the link didn't resolve.
Things should be in sync now as @briri just deployed the latest code to roadmap-stage. I observed the same thing you describe above @sjDCC - no error message but the email text is missing the plan owner name and the link does not resolve (screenshot below).
which of the links is not resolving?
The email template uses the user's firstname and surname but those fields are likely blank in this scenario hence the '"DCC guidance test (NIH template)" by .'
If we switch it to use name
instead it will display the email address there if the name is not available.
@briri let's fall back on the email if First name or Surname is empty
ok. its ready for you in the PR with the change to when a template version is created
Hey @briri The link that gave an error for me was "Click here" to accept the invitation...
This is all working on DMPonline test. Just leaving open for now so @stephaniesimms can check all ok on staging and then close
new issues have been introduced that prevent me from testing the entire workflow. i now get an error message when signing out of the system to accept the invitation, which appears to be related to some Shib configuration (screenshot below)
clicking the link in the invitation produces the error message in the second screenshot below.
the email title makes it look like spam. revised title in the comments below and added to the master email notices Google doc: https://docs.google.com/document/d/1Zt3QfPZ2q6yMOCVFOevXviwRX-XbZeGSxAAvbRa9w-M/edit
Signout Shib error message
Error message from clicking link in email invitation
this logout issue may be due to shib not being configured properly on stage. I think this must be new, we did not call the shib logout in the past. We got shib working on dev today. I'll set aside some time to set it up on stage tomorrow
@sjdcc can you confirm this is ok? Update email title for inviting a user to contribute to a plan who does not yet have an new account (same as the title for other share plan notices):
Email title: A Data Management Plan in [TOOL NAME] has been shared with you
@stephaniesimms I just made the title the same (PR #398 )
Yes, looks good.
The process works as expected and revised email looks good. Closing issue.
I shared a plan with a my personal account and was prompted to enter a password for my new account when I followed the link to view this. The following error was displayed, though logging in with my personal email and the password I set shows that the account was created nonetheless.![picture1](https://cloud.githubusercontent.com/assets/6169940/25389943/e09bed00-29c9-11e7-8bf3-ef222a6176b2.png)
On reflection, I wonder if this error occurred as the email had been known by the system at some point. Last week I had changed my account name to my personal email under edit profile and have since switched it back. Perhaps the trace of that threw the error?