in2code-de / luxletter

Newsletter system for TYPO3
https://www.in2code.de/agentur/typo3-extensions/luxletter/
23 stars 25 forks source link

absolute created links are wrong in NewsletterContainer.html #163

Closed bihor closed 1 year ago

bihor commented 1 year ago

Im using this in the Template NewsletterContainer.html:

Bitte klicken Sie hier. But it generates such a link in the preview email: http://xyz.de/typo3/ajax/luxletter/testMail?token=96abbadaca6c0281b0ee242b3c85a8be82b11a34 and such a link in the newsletter email: http://xyz.de/typo3/module/system/txschedulerM1?token=9f08b27b3dbe875026ca62d57a78f06a2151a1e3 The preview in the backend is OK. Tested with luxletter 17.3.0, 17.4.1 and 19.0.0. I would say, thats a bug.
einpraegsam commented 1 year ago

That's not possible because mail contents should work in 3 different contexts (frontend, backend, cli). If you would add a <f:link.page pageUid="123">test</f:link.page> in TYPO3 12, an exception will be thrown like: ViewHelper f:link.page needs a request implementing ServerRequestInterface. (1639819269)

So, I think, you have to use an external link to the page or write your own link VH (that's why VH GetUnsubscribeUrlViewHelper is existing).