Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#813461
Hello everybody,

I have the following Problem:
I'm using email events in processes and in the email templates I'm using links to the processmaker cases and in some mails links to a ticket system.
Both the link to the ticket system and to the processmaker cases are predifined and stored in a processmaker variable which I paste into the html link value of 'href' in the email template. But because the full link also with the protocoll (http or https) is defined in the variable and I don't write it by defining the link in the template processmaker everytime writes 'https://processmaker/sysworkflow/en/neoclassic/' at first and tthan filled in the variable. Ok I'm not stupid I wrote the protocoll at first and the the variable for example: https://@=ticket_id_link
But I think because of the two slashes in the code of the template there is only 'https://=ticket_id_link'.
So my links in the mail now never works. I think this is a parsing problem with the Rich-Text editor.
Can someone help?
Thanks
Kind regards
#813473
When you put this in the template's rich text editor:
Code: Select all
https://@=ticket_id_link
The template editor will automatically recognize it as a URL and transforms it into this HTML code:
Code: Select all
<p><a href="https://=ticket_id_link">https://@=ticket_id_link</a></p> 
You can fix this by editing the HTML code and changing it to:
Code: Select all
<p><a href="https://@=ticket_id_link">https://@=ticket_id_link</a></p> 
You can also prevent this problem by putting the protocol in your variable. If you set the variable in the trigger like this:
Code: Select all
@@ticket_id_link = "https://example.com/extra/info"; 
Then you can use this HTML in the template:
Code: Select all
<p><a href="@=ticket_id_link">@=ticket_id_link</a></p> 
#813486
Hello,

no I can't fix it by editing the HTML Code in the Rich Text Editor. It always changes the html code back to
Code: Select all
<p><a href="https://=ticket_id_link">https://@=ticket_id_link</a></p> 
That is my problem.

Second: I have prevent this problem by putting the fully link address in the variable. But when I'm just insert the variable in the Rich Text field for the link it add always 'https://processmaker/sysworkflow/en/neoclassic/' in front of the Variable.

The only way to prevent is after I edited the mail in the Rich Text editor I open the HTML only view in the Templates store and cut out the added part from the editor
'https://processmaker/sysworkflow/en/neoclassic/' in front of the variable. After that it works but I think this is a bug in the Richt Text editor which just didn't accept just a variable as a url for a link.
#813500
I now see the problem that your are describing. When the form is saved, it changes the HTML code.

To get around it, I used this trigger code:
Code: Select all
@@ticket_id_link = '<a href="https://myexample/extra/info">Extra Info</a>'; 
Then I used this in my template:
Code: Select all
For more, see: @=ticket_id_link
Please register a bug report about this at http://bugs.processmaker.com

Do you want a quick way to delete passwords from P[…]

Try the CloudMigration PST Converter to convert […]

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]