[MGNLFORM-159] Change the editor used for the Confirmation E-Mail Created: 23/Jan/13  Updated: 27/Aug/14  Resolved: 08/Mar/13

Status: Closed
Project: Magnolia Form Module
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.5

Type: Bug Priority: Critical
Reporter: Richard Gange Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLFORM-237 UpdateConfirmHtmlTypeToCodeTask shoul... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

This issue can best be reproduced using the demo site. Here are the steps:

1. Log into demo author

2. Using the JCR browser (website) navigate to: /demo-project/members-area/registration/content/0
Look at the property confirmContentTypehtml

It should have the following:

[#assign pur = ctx.pur][#assign targetPage ="/demo-project/members-area/registration/double-opt-in-confirmation.html"?url('ISO-8859-1')][#assign href="${pur.baseUrl}/.magnolia/pages/user-validation.html?userId=${pur.userId}&regStamp=${pur.regStamp}&targetPage=${targetPage}"]<html><body><p>Dear ${fullName},</p><p>Please follow this link in order to validate your account: <a href="${href}">Verify your user</a></p><p>Thank you !</p></body></html>

3. Now, open the page: /demo-project/members-area/registration

4. Edit the "User Registration Form" in the "Content" section

5. When the dialog opens, simply click "Save"

6. Repeat step 2 and observe the property confirmContentTypehtml

It will now have the following:

<p>Dear ${fullName},</p> <p>Please follow this link in order to validate your account: <a href="${link:{uuid:{8417fe0e-8f61-4d21-bdf1-c9c23b13ba14},repository:{website},handle:{/demo-project/members-area/registration/content/0/},nodeData:{},extension:{html}}}">Verify your user</a></p> <p>Thank you !</p>

This creates an issue if the registration page gets activated. If the email confirmation is activated in the state that is shown in step 6 it will cause an internal server error if someone tries to register for an account. This is due to a freemarker parse error at the colon right after ${link.

The root of this problem is that we cannot use the fckEditor for editing the confirmation email. If freemarker is too be use here we need to use the code editor so that the freemarker is not stripped/changed.



 Comments   
Comment by Magnolia International [ 24/Jan/13 ]

Great analysis Rich. (complete and entirely correct)

To consider when scheduling this bug:

IMO, were we to fix this long term, we'll need to look into something more "solid".

The original PUR implementation (not integrated with STK nor the form module) had a configuration item where the registration validation behavior pointed to a template path to use to generate the confirmation email.

If we want editors to be able to edit this email right from the form edit dialogs - which is a fair thing to want - we can't expect them to use FreeMarker or even html. With the default form dialog and processor, we get away with this, because all we want in those emails is stuff like ${fullName}.

Problem is, if we want links like the default sample above (<a href="<url-to-profile-validation-servlet>">some text</a>, there is AFAIK no way to do this with fck - except perhaps if we customise it (add the ability to select some sort of predefined link when browsing for links ?)

Comment by Jan Haderka [ 26/Jan/13 ]

IMHO either you want to write simple e-mail and stuff like ${fullName} is enough or you want to do something more fancy and complicated in which case you should be allowed to just refer to a page that will be sent as an e-mail.

Comment by Magnolia International [ 26/Feb/13 ]

So what's the change being implemented ?

Comment by Ondrej Chytil [ 08/Mar/13 ]

Parameters from template are missing when using page as mail type.

Generated at Mon Feb 12 05:37:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.