Jump to content

Weird image->httpUrl behavior creating links on wrong domain


Mitja
 Share

Recommended Posts

Hello,

since i started working with PW it was like a charm, everything is neat and easy to use.

But my problems began when people testing the new site started having problems with seeing resized images ...

the page which is bound to domain zivalnik.si started to create links to resized images beginning with em2.si as domain, which is the default domain of the server on which it is hosted ..

NOTE that only few users reported that behavior, and its not not bound to any particular browser or OS or network connection.

Im clueless to what causes this ...

this is the code im using for generating and serving pictures:

<img src="<? echo ($oglas->slika->first()) ? $oglas->slika->first()->size(436,436)->httpUrl : 'about:blank';?>" title="<?=$oglas->title?>" alt="<?=$oglas->title?>">

$oglas is a Page, $slika is an Image

images should begin as zivalnik.si/assets.... but instead they begin with the host server's domain - and only on few computers that dont seem to have anything in common - most of the users get their pictures display just fine ...

help!  ???

screenshot of the error and unloaded images:

post-3262-0-63580300-1436524800_thumb.pn

Link to comment
Share on other sites

Disregarding your particular issue (which might mean that you serve this site with multiple domains, could be a caching issue, could be connected to your httpHosts setting in /site/config.php, or be something entirely different) for a moment, do you really need httpUrl, or could you use url instead?

Relative URLs wouldn't have this issue at all. Just saying.

  • Like 1
Link to comment
Share on other sites

Disregarding your particular issue (which might mean that you serve this site with multiple domains, could be a caching issue, could be connected to your httpHosts setting in /site/config.php, or be something entirely different) for a moment, do you really need httpUrl, or could you use url instead?

Relative URLs wouldn't have this issue at all. Just saying.

this sovled the problem, million thanks and shame on me to not even try something so basic :D

  • Like 1
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...