In my Staging and Production environments, Drupal is installed in subfolders of the site domain eg:
https://www.mysite.com/subfolder
In my development environment, it's not and emails are working fine; however when in Staging or Production, any url token such as [node:url], or even a hardcoded url, in the body of the email prints out incorrectly in the outputted email.
For example, if the url is supposed to be:
https://www.mysite.com/subfolder/ideas/name-of-idea
The url generated in the email is:
https://www.mysite.com/subfolder/subfolder/ideas/name-of-idea
I have written a hacky redirect to catch any url that comes in with /subfolder/subfolder/ using the arg() function, but I was hoping there was a better fix available.
Comments
Comment #1
brydon CreditAttribution: brydon commentedSame problem here. Simplenews newsletter renders fine on the site but URLs have an extra subfolder when converted to HTML mail messages. Can you post details of your hacky redirect?
Comment #2
jaydee1818 CreditAttribution: jaydee1818 commentedI just created a module and add a function that checks the url and redirects if you get that doubling up.
So if the url that should be generated is this:
http://www.my-site.com/this/that/the-other
but it's building this:
http://www.my-site.com/this/that/that/the-other
Comment #3
brydon CreditAttribution: brydon commentedIn the end I just applied the Pathologic filter. That seems to have solved the problem.
Comment #4
blroot CreditAttribution: blroot commentedSame problem here