Workflow Email Notification pointing to wrong url | Community
Skip to main content
September 26, 2018
Solved

Workflow Email Notification pointing to wrong url

  • September 26, 2018
  • 23 replies
  • 11286 views

We recently migrated to AEM 6.4 and noticed all OOB workflow Email notification body content which also has URL mentioned pointing to local-host URL on all environments (dev,stage, prod)

This was working on prior AEM version we were on (6.1) and We do have OSGI Link Externalizer Config properly setup for all run modes on 6.4

Apart from externalizer, We do have   Day CQ Workflow Email Notification Service (com.day.cq.workflow.impl.email.EMailNotificationService) configured with correct values for Dev/stage/prod but its also not helping.

Can anyone tell if its a product bug or required additional configuration ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Our support team replied:

Ok, so when I tested with Externalizer then the setting is ignored. Whenever I use Host URL Prefix from Host URL Prefix

It changes the prefix.

Might a good idea to log a support case

23 replies

smacdonald2008
September 26, 2018

Have you followed all instructions in this AEM 6.4 doc?

Configuring Email Notification

September 26, 2018

Yes and everything else like "from address" , custom email notification where we are getting host url from externalizer and adding to email body is working fine.  Its only problem with OOB workflow notification (so far we know in 6.4)

I see in OOB email template , host.prefix is used and its not honoring externalizer run modes value we have set it up

smacdonald2008
September 26, 2018

Do you happen to have a fresh AEM DEV instance to try. I suspect this could be an upgrade bug. Can you test on Fresh instance to rule out that nothing is mis-configured.

September 26, 2018

Another thing i just tried was adding explicit value for host.prefix property (value =author url of dev instance) in Link Externalizer OSGI config and I can see now localhost is replaced with DEV author URL in email notification but It is adding extra http to Dev https url

the URL now i get in email is like this  http://https//aem-author-dev.xxxxxxxx/xxxxx

The reason why i did not have this value set up was because it says it is Deprecated Property.

Does not looks like upgrade issue.

Edit 1: its externalizer.host property value not host.prefix that I updated under Link Externalizer OSGI config

smacdonald2008

Edit 2: If i remove web protocol and just add server address in externalizer.host , it worked but it has http instead of https in email notification content body. So instead of having https://author.xyz.com in externalizer.host property value , If I just add author.xyz.com, its working

My question are

1. why do we need to populate externalizer.host in Link Externalizer which is deprecated

2. why its adding http instead of https which is not acceptable for us on upper environments

smacdonald2008
September 26, 2018

Also - here is the 6.4 docs for Externalizing URLs - https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/externalizer.html

I am checking internally to see if this is a known issue,

September 26, 2018

Thanks for checking internally. Meantime I will again go through this docs to confirm we are doing everything needed for 6.4

smacdonald2008
September 26, 2018

Also - i want to make sure there is not missing information to the AEM 6.4 docs.

Externalizing URLs

smacdonald2008
September 26, 2018

A team member replied:

I have used the Externalizer before. I'm a little confused by the question but they should use the externalizer.domains part of the config. As the user mentions the other configs are deprecated

In the code use the authorLink method

 // link to author
 externalizer.authorLink(resolver, "/my/page") + ".html";
 // => "http://author.website.com/contextpath/my/page.html"
https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/javadoc/com/day/cq/commons/Externalizer.html#authorLink-org.apache.sling.api.resource.ResourceResolver-java.lang.String-

I have not had an issue with an extra https being appended...

September 26, 2018

Yes we are using same approach using externalizer.domains to different mode , you can see that screenshot in thread main question.

I dont have any issue using it with our custom notification where I am following exactly same as you mention and it work without any issue.

The issue is only with OOB Workflow Email Notifications which are non customized and I have no idea why they are not having correct URL without populated deprecated externalizer.host property value which if populated like i said above is casing extra http or https issue.

smacdonald2008
September 26, 2018

I am testing this and will make use of this API within a workflow step. This use case and question raised my attention that we do not have a good Quick Start HELPX article that shows use of this API.