Jump to content
  • 0

Email Templates With Wrong Urls


Question

Posted

I have noticed that emails sent to customers for invoice due notices are sent with wrong url. I have installed blesta in directory domain.com/billing but emails sent have a "Pay Now" link directing to domain.com/clients/pay/method/213/ghfh.....

 

I have checked the payment url in email templates and its set to just {payment_url}. 

 

What Is the best way to fix this?

 

Thanks

19 answers to this question

Recommended Posts

  • 0
Posted

what is the wrong part of the link?  Is it just missing the billing directory in the link? (site.com/clients instead of site.com/billing/clients?)  If this is the case, check to make sure you have your installation path correct at settings > system > general > root web directory

  • 0
Posted

what is the wrong part of the link?  Is it just missing the billing directory in the link? (site.com/clients instead of site.com/billing/clients?)  If this is the case, check to make sure you have your installation path correct at settings > system > general > root web directory

 

Thanks for the suggestion, I did check that. The root web directory Is set fine /home/myusername/public_html/billing/ 

  • 0
Posted

that is a TIP not a FIX .

 

Thats true, I hope we will get a word from Blesta Devs on this. As It was supposed to work without tweaks

 

I also tried to fix this on my install, but to no avail. Instead, I simply added this to the .htaccess file at the root of the domain:

Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^client/(.*)  https://example.com/BLESTA-SUBDIR/client/$1 [R=301,NC,L]

Hope this helps.

 

Thanks, let me give It a try and I will get back to you.  :D

  • 0
Posted

I also tried to fix this on my install, but to no avail. Instead, I simply added this to the .htaccess file at the root of the domain:

Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^client/(.*)  https://example.com/BLESTA-SUBDIR/client/$1 [R=301,NC,L]

Hope this helps.

 

Worked for me.... I added just the bellow line tho. Thanks a lot. ;)

 

Options +FollowSymlinks -MultiViews

RewriteRule ^client/(.*)  https://example.com/BLESTA-SUBDIR/client/$1 [R=301,NC,L]
  • 0
Posted

Can you take a look under Settings > System > Basic Setup for "Root Web Directory". Is this path correct, ie, does it include the full server path to, and including your billing sub-directory?

 

When Blesta runs via the cron, it can't tell what the URL is, and it relies on this setting to determine the path. At least, that's what it's suppose to be doing.

  • 0
Posted

Can you take a look under Settings > System > Basic Setup for "Root Web Directory". Is this path correct, ie, does it include the full server path to, and including your billing sub-directory?

 

When Blesta runs via the cron, it can't tell what the URL is, and it relies on this setting to determine the path. At least, that's what it's suppose to be doing.

 

Yup, he's already checked that and said it was set correctly (this is what I initially thought of as well).

  • 0
Posted

Can you take a look under Settings > System > Basic Setup for "Root Web Directory". Is this path correct, ie, does it include the full server path to, and including your billing sub-directory?

 

When Blesta runs via the cron, it can't tell what the URL is, and it relies on this setting to determine the path. At least, that's what it's suppose to be doing.

 

As @Daniel B said I I have set the path correctly

*/5 * * * * /usr/bin/php /home/myusername/public_html/billing/index.php cron

 

Where billing Is my directory

  • 0
Posted

As @Daniel B said I I have set the path correctly

*/5 * * * * /usr/bin/php /home/myusername/public_html/billing/index.php cron

 

Where billing Is my directory

If it's cPanel try usr/local/bin/php 

  • 0
Posted

As @Daniel B said I I have set the path correctly

*/5 * * * * /usr/bin/php /home/myusername/public_html/billing/index.php cron

 

Where billing Is my directory

 

 

If it's cPanel try usr/local/bin/php 

 

thought we were talking about the root web directory, not the cron...

  • 0
Posted

thought we were talking about the root web directory, not the cron...

 

Opps, sorry I intended to post that on another post. And I just noted that even after editing the .htaccess Some templates were still sending the wrong url (ie.Invoice created) , I just had to go to edit and re-save the templates. And that did the trick

  • 0
Posted

Opps, sorry I intended to post that on another post. And I just noted that even after editing the .htaccess Some templates were still sending the wrong url (ie.Invoice created) , I just had to go to edit and re-save the templates. And that did the trick

have you installed blesta in the root directory , then youhave moved to sub-directory ?

  • 0
Posted

have you installed blesta in the root directory , then youhave moved to sub-directory ?

 

Nope, my first installation was In that directory. It works fine now after just clicking edit and re-saving again. I just changed the titles and all Is well now. ;) 

 

I'm not sure of the cause of the problem tho.

  • 0
Posted

Having the exact same issue too. When the first invoice is generated, the pay now link goes to: https://domain.com/client/pay/method/etc... when it should be https://domain.com/manage/client/pay/method/etc

 

This ONLY happens with the first auto generated invoice. If I go to the client's invoice and manually hit the resend button, that generated email has a link that works properly.

 

I've applied the rewrite rule in .htaccess as per John's suggestion, and that's working, but it still doesn't explain the problem...

  • 0
Posted

Having the exact same issue too. When the first invoice is generated, the pay now link goes to: https://domain.com/client/pay/method/etc... when it should be https://domain.com/manage/client/pay/method/etc

 

This ONLY happens with the first auto generated invoice. If I go to the client's invoice and manually hit the resend button, that generated email has a link that works properly.

 

I've applied the rewrite rule in .htaccess as per John's suggestion, and that's working, but it still doesn't explain the problem...

 

Is your root the same like this quoted above? 

 

The root web directory Is set fine /home/myusername/public_html/billing/ 

 

 

If so remove the billing bit in your case manage.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...