Modify

Ticket #14429 (new defect)

Opened 12 months ago

Last modified 9 months ago

Comment notify email has invalid links when siteid option is off

Reported by: alfromlongbeach@… Owned by:
Priority: major Component: General
Version: 5.4 Keywords: email comment link
Cc: issues@… Time planned: 1d
Time remaining: 1d Time spent: 1d

Description

Emails that are generated to site contact, to notify of new comment posted, will provide links that still contain the siteid in the path, even when the target Mura system is set to hide siteid in URLs.

The resulting links produce 404 errors from the server/tomcat to the user when clicked.

Attachments

Change History

comment:1 Changed 12 months ago by Alfromlongbeach@…

Links on site manager dash might exhibit same problem. Want a separate ticket?

comment:2 Changed 11 months ago by anonymous

Vote +1

comment:3 Changed 9 months ago by alfromlongbeach@…

from a forum post by spleeze 2-2-11:

I just patched this in my local copy. The fix for me was in requirements/mura/content/contentCommentBean.cfc at line 439.

I changed the hardcoded URLs (with siteID and index) to be more dynamic based on the site configuration:

<cfset var serverpath = ' http://#listFirst(cgi.http_host,":")##variables.configBean.getServerPort()##variables.configBean.getContext()#/'>

<cfif application.configBean.getSiteIDInURLS()>

<cfset serverpath &= '#getSiteID()#/'>

</cfif>

<cfif application.configBean.getIndexFileInURLS()>

<cfset serverpath &= 'index.cfm/'>

</cfif>

<cfsavecontent variable="notifyText"><cfoutput> A comment has been posted to "#rscontent.title#" by #getName()#.

COMMENT: #getComments()#

Approve #serverpath##variables.utility.createRedirectID(arguments.contentRenderer.getCurrentURL(true,"approvedcommentID=#getCommentID()#"))#

Delete #serverpath##variables.utility.createRedirectID(arguments.contentRenderer.getCurrentURL(true,"deletecommentID=#getCommentID()#"))#

View #serverpath##variables.utility.createRedirectID(arguments.contentRenderer.getCurrentURL())# </cfoutput></cfsavecontent>

View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.