Problem with Links and Pics in Newsletter

Phoca Email (Newsletter) - sending emails and managing newsletters in Joomla! CMS
Tradewithme123
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Oct 2017, 21:39

Problem with Links and Pics in Newsletter

Post by Tradewithme123 »

Hello,

i have created a Newsletter for Testing first. My Editor is Tiny. My Site is in German.

First i put in a picture by clicking „Bild“ Icon and chose one from folder /images/logo

In the Newsletter component i can see it.

Then i have some text. After that i put in some „News“ bei clicking „Beitrag“ Button. Phoca puts in a link with name of Newsarticle.

After sending i get the Newsletter, but the picture ist not there and the articlelinks are incomplete:

The start with index.php?......
The domainadresse is missing! Html is chosen in joomla config for email. Where is the mistake?

Hope someone can help me.

Best regards
Lars
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47865
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with Links and Pics in Newsletter

Post by Jan »

Hi, try to see:
https://www.phoca.cz/documents/60-phoca ... hoca-email

Phoca Email tries to correct the image paths to be full paths, what happens when you switch from editor to standard textarea, do you get the same problem with the paths?

Jan
If you find Phoca extensions useful, please support the project
Tradewithme123
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Oct 2017, 21:39

Re: Problem with Links and Pics in Newsletter

Post by Tradewithme123 »

Hi Jan,

thanks for your answer. I created a link in a menu to phocamail/newsletter. But it does not change anything. The domain is still missing in articlelinks and pictures.

What do you mean with switch from editor to text area?

The only way i got a „solution“ is to change the option in tinymce option, that superuser should set absolute links. I read that it is no good solution and relative links should be better, but then the links are correct.

Do you have any other idea what could be incorrect?

Regards,
Lars
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47865
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with Links and Pics in Newsletter

Post by Jan »

Hi, I means you should skip using editor for test only, to see if the links are not changed by editor when saving them :idea:

Jan
If you find Phoca extensions useful, please support the project
Tradewithme123
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Oct 2017, 21:39

Re: Problem with Links and Pics in Newsletter

Post by Tradewithme123 »

Hi Jan,

then i don‘t have the possibility to put in an article link or picture, or not?

The problem is wirh tiny and jce. When i put in tiny plugin config the path to relative, i have in the newsletter the relative path too. On the preview i can see pictures etc., but in the arrived newsletter the picture is not there an the artikel links do not open the link, because they are relative...startin with: index.php?

If i take absolut path in tiny config, everything goes well. Pics are there, links are wirh full path.

But i only want absolute path for phocaemail in the newsletter. The rest of the homepage should use relative links.

Is this possible? Before this actual homepage i used joomla 1.5 an there was no problem like this. Everything was relativ but newsletter were absolute. Can i tell phocaemail sonewhere to use absolut path only?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47865
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with Links and Pics in Newsletter

Post by Jan »

Hi, the problem is, the editor changes the links, so Phoca email gets these links like they are managed by the editor.

The body is here:
administrator\components\com_phocaemail\views\phocaemailsendnewslettera\view.json.php
line cca 116:
$body = PhocaEmailSendNewsletterEmail::completeMail($body, $replace);
So the chaning of link can be similar to function in Phoca Email (not newsletter):

E.g. try to add:
$body = str_replace('<img src="', '<img src="'. JURI::root(), $body);
which should change relative path to images to absolute path :idea: The problem is there should be some more code to detect if the link is full path or not, etc. :idea:

Jan
If you find Phoca extensions useful, please support the project
Tradewithme123
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Oct 2017, 21:39

Re: Problem with Links and Pics in Newsletter

Post by Tradewithme123 »

Hey Jan,

thanks for your reply. I will try it as soon as possible. Hope it will work. I give you a feedback directly.

Thanks and regards
Tradewithme123
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Oct 2017, 21:39

Re: Problem with Links and Pics in Newsletter

Post by Tradewithme123 »

Hello Jan,

i tried you proposition. I added " $body = str_replace('<img src="', '<img src="'. JURI::root(), $body); " behind " $body = PhocaEmailSendNewsletterEmail::completeMail($body, $replace); "

The result was, when sending the newsletter he said:
Sending Newsletter 1/1
Mail sent

Normaly he said:
Sending email 1/1
xxxx@xxxxx.com in green (email of user)
mail sent

Result was, no email has arrived. I tried a few times.
Did i do anything wrong....did you mean it different then i made?
I made a second try like this:

I created a news user in joomla. he got a own group. In Tinymce plugin option i created a new profile. The usergroup of the new user got the same rights as a administrator, but with absolut path.

With this user i can send correct newsletters with absolut path. So this a a way, i could live with. If someone has another ideas, what can be wrong, i am happy about every answer, but so i am able to send newsletter at the moment or if no one has an idea, i could do always.

A further small question: Can i tell phocamail, that new susbcriber get only one special mailinglist assigned? I have 2 list...one for Testing and one Real. So every new subscriber geht both mailinglist newsletter. i have to edit every new user an say: only list Newsletter.....

Thanks a lot
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47865
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with Links and Pics in Newsletter

Post by Jan »

Hi, when subscribing to the newsletters, you can list them, so you can list only one (e.g. when you comment the second) you the user will be subscribed always only to one list :idea:

When you look at the errorLog, do you get any error there when not sending the email :idea:

Jan
If you find Phoca extensions useful, please support the project
Tradewithme123
Phoca Member
Phoca Member
Posts: 11
Joined: 10 Oct 2017, 21:39

Re: Problem with Links and Pics in Newsletter

Post by Tradewithme123 »

Hi,

so you mean the subscriber „choose the list“ while subscribing, correct? Or do you see nothing from this list in the front end? It would be good, if i could say in the backend: Put new subscriber to list newsletter only.

To the Problem: In Administratior/logs/error.php is nothing written in to phocamail error. I found nothing else according to phocamail for errors. Has phocamail a special logfile?
Post Reply