filipsuk / eventigo-web

Events aggregator and newsletter
https://eventigo.cz
21 stars 1 forks source link

Links in emails without base url #20

Closed filipsuk closed 7 years ago

filipsuk commented 7 years ago

Event links in last newsletter look like this:

http://redirect/?url=https%3A%2F%2Ffacebook.com%2Fevents%2F266045747192476%2F

It is not a SendGrid problem.

Dynamic newsletter preview e.g. https://eventigo.cz/newsletter/dynamic/5 works OK. Looks like console command problem (newsletters:render).

Edit: Link should look like this:

https://eventigo.cz/redirect/?url=https%3A%2F%2Ffacebook.com%2Fevents%2F1325356277554063%2F
TomasVotruba commented 7 years ago

How should they look like?

What is the responsible class?

fprochazka commented 7 years ago

Let me guess: it worked with kdyby/console, right? ;)

Nette doesn't have HttpRequest populated in CLI, so the links cannot be properly generated. LinkGenerator depends on HttpRequest.

You need this contributte/http (or.. you know... Kdyby/Console)

TomasVotruba commented 7 years ago

I see :-) my bad.

Let me fix that and add test next week. I'm tripping over Vienna and BA now

f3l1x commented 7 years ago

Oh. :) We could add it to contributte/console, but as @fprochazka mentioned, it´s in contributte/http.

f3l1x commented 7 years ago

@TomasVotruba @filipsuk I've completly forgot that providing URL is already in contributte/console.

https://github.com/contributte/console/blob/master/.docs/README.md#configuration

TomasVotruba commented 7 years ago

@f3l1x Great to know. Could you send PR for that please?

f3l1x commented 7 years ago

Related: https://github.com/eventigo/eventigo-web/pull/21