• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

images not loading in site preview

C

crash0verride

Guest
Hi,

I migrated 80 sites to plesk last night, but when I preview the sites in "Site Preview", some sites render fine, others do not have their pictures, and on some one them I get the following message:

Code:
ERROR: PleskFatalException
Unable to resolve host name

0: /usr/local/psa/admin/plib/common_func.php3:158
	psaerror(string 'Unable to resolve host name')
1: /usr/local/psa/admin/htdocs/sitepreview.php:14


ERROR: PleskFatalException
Unable to resolve host name

0: /usr/local/psa/admin/plib/common_func.php3:158
	psaerror(string 'Unable to resolve host name')
1: /usr/local/psa/admin/htdocs/sitepreview.php:14

ERROR: PleskFatalException
Unable to resolve host name

0: /usr/local/psa/admin/plib/common_func.php3:158
	psaerror(string 'Unable to resolve host name')
1: /usr/local/psa/admin/htdocs/sitepreview.php:14

Has anyone else experienced this? Anyone any ideas?
 
Hi,

probably in your code the URL of the picture/s is something like:

http://yourdomain.tld/image_folder/image.img

and the domain is not pointed to the server .. then if you try the preview it will show the files that have links like image_folder/image.img or just image.img, but wont show you the files that have a domain in its URL.

...
Unable to resolve host name
...
This error is saying the same.

Hope that helped you and hope a domain propagation is the only issue there. :)

Cheers!
 
I think it is to do with the way the previewing page handles reference paths for the CSS file and the images. When I add the IP to my hosts file and load the page in my bowser 90% of sites work perfectly.

For anyone experiencing problems with the site preview I would suggest hand hacking your hosts file to bypass DNS.
 
Back
Top