Modifying e-mail Notification URL ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014 06:11 AM
server { listen 443; server_name alfresco.companyname.com; ssl on; ssl_certificate /etc/ssl/certs/alfresco.companyname.com.crt; ssl_certificate_key /etc/ssl/private/alfresco.companyname.com.key; rewrite ^/$ /share; location / { root /opt/alfresco-4.2.e/tomcat/webapps/share/; proxy_pass https://localhost:8443; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header host $host; proxy_set_header X-Forwarded-Server $host; } }
Basically i want users to be able to access the site internally and externally which is working fine so far, all they have to do is type in alfresco.company.com into the url bar of their browser.
Now the problem:
When i start a workflow and check the email notification checkbox it sends out an email (as intended) but the link is… not optimal, this is what i am receiving:
https://alfresco.companyname.com:8080/share/page/task-edit?taskId=activiti$245
This is obviously somewhat breaking things. Is there any way on how I could remove the ":8080" from the url?
I have checked the forums and some suggestions have been to edit the email notifications code itself which would be this part within the wf-email_de.html.ftl file if i am not mistaken:
<#if args.workflowPooled == true> <p>Klicken Sie auf diesen Link um die Aufgabe einzusehen:</p> <p><a href="${shareUrl}/page/task-details?taskId=${args.workflowId}">${shareUrl}/page/task-details?taskId=${args.workflowId}</a> <#else> <p>Klicken Sie auf diesen Link um die Aufgabe zu ändern:</p> <p><a href="${shareUrl}/page/task-edit?taskId=${args.workflowId}">${shareUrl}/page/task-edit?taskId=${args.workflowId}</a> </#if>
What i do not understand is where the ${shareUrl} value is defined/set and where i coudl edit this so the ":8080" is removed.
I welcome any and all suggestions.
Kind regards,
Alex
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 12:30 AM
You can change below properties as per your requirement and accordingly URL will be generated.
alfresco.context=alfresco
alfresco.host=my.host.com
alfresco.port=8080
alfresco.protocol=http
share.context=share
share.host=my.host.com
share.port=8080
share.protocol=http
If you need to understand detail code then, Please check below code
1)MailActionExecuter is responsible to send Share email notification
2)And this class process FTL template and gets URL from SysAdminParams and which basically refers above properties.
Hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 06:48 AM
I am not quite sure if you understand what exactly it is that i need here. I tried changing the alfresco-global.properties sections you mentioned in your post, but unfortunately doing that kind of breaks everything, especially considering that i am using nginx as the webfrontend and reverse proxy for SSL.
This is what i have currently in my global properties file and this works perfectly:
dir.root=/opt/alfresco-4.2.e/alf_dataalfresco.context=alfrescoalfresco.host=alfresco.companyname.comalfresco.port=8080alfresco.protocol=httpshare.context=shareshare.host=alfresco.companyname.comshare.port=8080share.protocol=https
If i remove the share.port=8080 and share.protocol=https from the list then emails and the system will continue to work, but when i start a workflow and send email notifications via workflows the address i will be receiving is this:
http://alfresco.companyname.com:8080/share/page/task-edit?taskId=activiti$845
This address technically speaking works, but i want to get rid of the :8080 within the link… any suggestions?
EDIT:
If there is no simple way to do this then I think i may just go the route of hardcoding/tailoring the email template link prefixes… was looking for a more elegant solution though
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2014 03:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2014 11:51 AM
httpd.conf
<VirtualHost *:443> ServerName fqdn.net SSLEngine on SSLCertificateKeyFile to/some/filepath/file.key SSLCertificateFile to/some/filepath/file.crt SSLCACertificateFile to/some/filepath/file.crt RequestHeader set X-Forwarded-Proto "https" ProxyPass / http://fqdn.net:8080/ ProxyPassReverse / http://fqdn.net:8080/ ProxyTimeout 300 SSLProxyEngine on <Proxy *> allow from all </Proxy></VirtualHost>
Not sure if that helps or not, but maybe you can draw and idea from it. Hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2014 09:55 AM
While i appreciate your comment and it might be helpful for people who use apache, I have the reverse SSL proxy working perfectly fine on alfresco right now. There are zero issues with it.
The main problem I am having is that whenever you start a workflow and check the email notification box for that workflow you will receive an email(for that workflow) which still has the ":8080" inside the link, i want that :8080 removed from the email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2014 12:16 PM
http://yourfqdn.net/alfresco
login as admin…
Company Home/Data Dictionary/Email Templates. From here you can modify what you want. Hope it helps.
Edit…
Have you looked at this file?
tomcat/webapps/share/WEB-INF/classes/alfresco/share-config.xml
2nd Edit…
Your issue sparked interest in something that I had put back on hold to come back to later. I've done about three different workflows and the link that I get is this.
https://fqdn/share/proxy/alfresco/api/node/content/workspace/SpacesStore/678ca124-014d-4165-9bef-9ef...
in the alfresco-global properties I've set the port to 443 on share.
I've also edited tomcat/shared/classes/alfresco/web-extension/share-config-custome.xml
I could post a copy if you want to take a look.
This is pretty much the only thing I can think of that would help you with your issue. I haven't modified any files below the WEB-INF directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2014 07:26 AM
I have marked your comment as helpful and useful, since it actually is. Yes i would love to see your modified files (take a look at it) whenever you find some time to copy paste them into here

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2014 02:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2016 08:35 AM
Same problem here, I have a Nginx as a reverse proxy e the e-mails from activity came with the Alfresco port and not with Nginx port. Some news about this problem?
