10810 Posts in 2495 Topics by 1784 members
|Go to End|
21 October 2013 at 12:36pm
Sharp intake of breath - my first post here.
I have been using SS for some months now with mostly good results, but recently came across a problem with teh Newsletter Module in SS 3.1.1
When I send a test email, everything is fine - but - when I send out a live email the formatting of links is destroyed.
Sample would be a hyperlink http://mywebsite.com is replaced with /var/www/mywebsite/newsletterlinks/bd9cd393e8add09d3e60d3c3b7da035f - which obviously doesn't work.
Links to embeded images are likewise corrupted
I've looked, but can't see anything similar here - any help appreciated
"description": "The SilverStripe Framework Installer",
13 January 2014 at 6:13am Last edited: 13 January 2014 6:13am
I just recently installed the dev-master (because older wouldn't work on SS 3.1), and have the same problem. I'm trying to find how to fix it, hoping I will in time before presenting it tomorrow.
In any case, I think I'm interested in contributing to this module (since I need it myself anyway). It looks like it has a lot of interesting features, but a lot of them are currently broken.
I have never really contributed to an open source project before. Should I contact someone first, or just start making changes and uploading them as patch suggestions on github or something?
13 January 2014 at 9:00am Last edited: 13 January 2014 9:24am
Took me longer than it should have, but the issue is the queued message sending, because requests on those do not occur from a normal HTTP request, and therefore SilverStripe's base_tag is wrong.
This causes the URLs in the queued emails to be messed up with absolute URLs to the filesystem, rather than to the website URL.
Is there a clean way to set the CORRECT SilverStripe base directory upon its startup? Isn't that saved somewhere? Then it could revert to that when it can't find it from the _SERVER variable.
For now, I'm using a hardcoded workaround, replacing the long filesystem path with the website path (at the start of Mailer::sendHTML). I also had to disable tracking, since the original URLs had the filesystem path in them too, and I didn't want to start checking how to work around that too just yet (NewsletterEmail::_construct, disable the entire if clause starting on line 72).
If the base_tag issue for queued requests can be fixed, it would solve these issues in a better way.
24 February 2014 at 5:33pm Last edited: 24 February 2014 5:35pm
I found a better way to fix this issue: in my website's _config, I now have this:
// put your own website there, including the / at the end
That makes sure that Director does not totally mess up the base directory when SilverStripe is called from cron, or whatever it is that messagequeue does in order to send newsletter emails. This makes it so that the newsletter module works again, with link tracking and everything.
Now, on to making the images tracable... which I suppose is 100% new work.
|Go to Top|