Developer forum

Forum » CMS - Standard features » Password Reset link not generated on preview

Password Reset link not generated on preview

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have setup a new System email page with the new logic for creating Password reset links.

I have defined an Email campaign using the forementioned page and I am now trying to test the functionality.

I have tried both the preview and the regular send and in both cases the link ({{DWPasswordRecoveryUrl}}) is empty.

I have set :

Render content for each recipient = true
Ensure unique recipients = true

I have tried with users without passwords, with passwords (no encryption), with password (with encryption) and I go the same outcome. The templates are standard Swift templates.

What am I doing wrong? Is there any dependency on a NavigationTag?

I am using DW 9.15.12.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

What is the issue?

The reset link cannot be set on preview as it requires a user.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have tried both the preview after selecting a User and sending the email to a test user.

In both scenarios, the link (href property) was empty. I was wondering if there is a setting defining the Login page to build the link to.

Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Did you setup the button like this?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,
Exactly like that. I am just wondering how would the system know the login page to create the link to? Maybe that's the missing part.

My solution started as a Swift project a while ago, before the introduction of the System Emails concept.

Thank you,
Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

On the Swift signin page, in the reset password section, the reset password mail is chosen:

 

When a user choses "reset password", the page is rendered into a temp template that reset password functionality will use for the mail it will send out. When the page with the reset password mail is rendered, the reset password button with the system command:

Will render a tag in the markup that looks like this: {{DWPasswordRecoveryUrl}}

And that will be translated into the @GetValue("DWPasswordRecoveryUrl") tag when executed and DWPasswordRecoveryUrl tag is created by the forgot password code.

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have made these changes:

 

And this is how my Reset Password paragraph is set up:

 

In the preview of the page (not in the Email Marketing context) I see the {{DWPasswordRecoveryUrl}} value on href but in both sending the email and preview of the email on a specific user, the href property is empty.

Adrian

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You cannot use the email marketing to send the mail - do you do that?

You can only send the mail when using "Forgot password" feature

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Dynamicweb Care has clarified that we cannot use that paragraph in EmailMarketing.

The scope of my request is to send emails to newly created users (via integration), and the users will then have to insert their own passwords.

It is an old request that seemed to recur in forum posts for the last couple of years. I have posted a couple of these questions myself: https://doc.dynamicweb.com/forum/cms-standard-features/cms-standard-features/send-welcome-email-to-new-users-imported-or-not

Obviously, we cannot send the generated passwords via email anymore, and it seems pretty decent expectation to let the user set their own password, even if we create passwords for them upon user creation.

I have seen various suggestions over time, and I was hoping that Swift System email would finally take care of this without having to customize templates. And I still believe that it could be possible to be handled as a standard feature.

For now, I have fallen back to one of the suggestions on the forum, that we have used before. But having a standard documented way of handling this request, would be ideal as it seems to be requested over and over again in almost any B2B project.

Thank you,

Adrian

 

 

 

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

HI Adrian,

 

Attached a template that does it. Please check the Restrictions of the Item type, but should just work with System Emails. 

 

It took a copy of the Button Email Paragraph Item Type (from a while back) and stripped down of unnecessary settings for this particular purpose. I'm sure that if the Swift team were to implement it, would be slightly different.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

Thank you very much.

I believe the implementation should be in the core of Dynamicweb, where the DWPasswordResetLink is created. 

The challenge is to identify the page where the link should be created. And that should either be a configuration or a convention based on a Navigation tag. I would prefer the first option since it would be clearer and could be documented more easily.

If the change is integrated into Swift, I believe it will probably be very similar to your suggestion. But I am sure they know better how and if it will be integrated.

Thank you again.

Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

You are welcome

 

You must be logged in to post in the forum