[closed] Email notifications - broken objectid


#1

Not sure how long this has been a problem (I don’t normally do the content approvals) but noticed that the emails being sent out from FarCry to content approvers contain broken links. The main issue is that the objectid is being wrapped which breaks it. e.g.

Page “test” is awaiting your approval
You may approve/decline
this page by browsing to the following location:
http://127.0.0.1/webtop/edittabOverview.cfm?objectid=CD330430
-0305-11E4-9266005056A670CB

I found that in /packages/lib/email.cfc it explicitly sets the wrap to 74 characters – why is that?

Also, as email.cfc supports sending HTML emails is it worth looking at updating the calls from /packages/farcry/versioning.cfc to send as HTML rather than the default plain text? Maybe a configurable option in the webtop?


#2

I’m having a look at this. Regarding the 74 characters - this is a typical
convention for plain text emails (though the exact number can vary from
system to system) to leave space for a few rounds of quoting.

Blair


#3

I have updated the emails to include an HTML version (FC-3006
https://farcry.jira.com/browse/FC-3006). While I was in there I also
fixed the links so that they use:

  • the General Configuration “Admin Server” setting
  • the Environment Configuration Canonical Protocol and Canonical Domain
  • and finally falls back to http://#cgi.http_host# if those aren’t set

Blair


#4

Excellent - thanks Blair. I’ll grab this from Git and give it a spin over lunch.


#5

Hi Blair,

Have the changes been committed to GitHub? I can’t see them in any branch.

Cheers
Mark


#6

You got me :slight_smile:

The changes are definitely pushed to GitHub now.


#7

Hi Blair,

I think there is a small mistake in the changed code. Shouldn’t lines 551 and 553 of packages\farcry\versioning.cfc be:

<cfset stEmail.variables[5] = stEmail.variables[5] ....

and not

.... stEmail.variables[4]

Cheers
Mark


#8

I don’t think so - 4 is the comment, 5 is the approval link. 545-549 are
setting the domain part, and 550-554 are setting the webtop location. You
can see how the values are used in the email content (556-566) - the {n}
values correspond to the values in the array.

Blair


#9

Sorry for the late reply - meetings.

I guess I better take a better look at what is going on :slight_smile: Just the emails to say content has been sent back to draft don’t contain a valid URL. The link in the email starts with /index.cfm rather than protocol and domain.

I’ll do some testing tonight when I’m finished with my meetings.


#10

There was an issue with the way the environment settings were being
retrieved, that could have caused the domain to go missing. I’ve pushed a
fix for that.


#11

I’ll grab and deploy this morning. Thanks Blair!