Jump to content

Wrong image url(domain) on emails


ash-f

Recommended Posts

For some reason, emails sent from Prestashop has a wrong url.
It's the old domain of dev site.
I can not find any old domain in the DB or the htaccess or the config file  I'm aware of.
Template variable is "mailThemesUrl."

i.e.
Wrong url on emails
https://dev.***.com//mails/themes/modern/assets/baseline-location_on-24px.png

The url should be like this.
https://www.***.com/mails/themes/modern/assets/baseline-location_on-24px.png


Strange thing is that when I preview emails in the backend, it has the correct domain.
The old domain appears only on sent messages.

Do you guys know how can I update it?

Prestashop version: 8.1.2

Edited by ash-f (see edit history)
Link to comment
Share on other sites

  • 7 months later...

Hi,

Check your database for any lingering references to the old domain. You can run the following SQL query to search for any instances of the old domain:
SELECT * FROM ps_configuration WHERE value LIKE '%dev.%';

If you find any entries, update them with the correct domain:
UPDATE ps_configuration SET value = 'https://www.***.com' WHERE value = 'https://dev.***.com';

Regards.

Link to comment
Share on other sites

Thanks for the reply!

The store used to be on the "epood" subdomain, now it's on the "pood" subdomain. The image address still points to the "epood" subdomain. Checked the entire database and there search does not find "epood".
The address is probably written in some file, but in which one I can't find.

Link to comment
Share on other sites

  • 2 weeks later...

Did anyone figure this out?

Domain was changed in back end and all references to old domain corrected in database. Still the email image URL's point to old domain.

Link to comment
Share on other sites

On 10/25/2023 at 1:18 AM, ash-f said:

For some reason, emails sent from Prestashop has a wrong url.
It's the old domain of dev site.
I can not find any old domain in the DB or the htaccess or the config file  I'm aware of.
Template variable is "mailThemesUrl."

i.e.
Wrong url on emails
https://dev.***.com//mails/themes/modern/assets/baseline-location_on-24px.png

The url should be like this.
https://www.***.com/mails/themes/modern/assets/baseline-location_on-24px.png


Strange thing is that when I preview emails in the backend, it has the correct domain.
The old domain appears only on sent messages.

Do you guys know how can I update it?

Prestashop version: 8.1.2

Hi,

  • Clear the cache in Prestashop.
  • Check email template files for hardcoded URLs.
  • Verify all relevant database entries.
  • Ensure all URL settings in Prestashop admin are correct.
  • Check server configuration and .htaccess files.
  • Verify email sending configuration.
  • Review custom modules and overrides for hardcoded URLs.
  • By systematically checking these areas, you should be able to identify where the old domain is being referenced and update it to the new domain.

Thanks!

Link to comment
Share on other sites

4 minutes ago, vadimest said:

I checked everything:
htaccess
robots
sitemap
database
mails templates
cache cleaned

But the image address in the mail still points to old subdomain...

Hi,

It's possible the URL is hardcoded somewhere in the codebase. Use the grep command to search for the old domain in all files.

Example :

Quote

grep -r "dev.old-domain.com" /path/to/prestashop/

Thanks!

Link to comment
Share on other sites

20 hours ago, kamppa said:

Old domain was there under sitemap. Creating robots.txt again surely would have changed it also. 

Sitemap and Robots.txt have cero influence how a website reacts. Both give details to search engines.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...