Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 30, 2010 @ 15:20
    Kim Andersen
    1

    Wrong path to backend images, after moving site to a new domain

    I have just moved a small site from a dev-domain (http://new.domain.com) to the "real" live domain (http://www.domain.com). When I say moved, I just mean that I have changed the binding in the IIS. Until now there have just been a splash screen on the real domain.

    After I have changed the binding in the IIS, the frontend part of the site works just fine, but something goes wrong in the backend. When I log into Umbraco on the main-domain there's a lot of images not showing. In example, the sections-icons are missing, the small arrows in the content tree are missing etc.. But I can see in my Firebug that the images are missing because of a wrong path to the images.

    The paths are somehow pointing to the "old" dev-domain.

    Eg. the path to the sections images are linking like this:

    #tray li a{
       background: url(http://new.domain.com/umbraco/images/tray/traySprites.png);
    }

    If I change the path to this:

    http://www.domain.com/umbraco/images/tray/traySprites.png

    The images are shown correctly. But I can only change this in my Firebug. The file that are creating the above CSS are called:

    http://www.domain.com/umbraco/DependencyHandler.axd?s=L3VtYnJhY29fY2xpZW50L1RyZWUvdHJlZUljb25zLmNzczsvdW1icmFjb19jbGllbnQvVHJlZS9tZW51SWNvbnMuY3NzOy91bWJyYWNvX2NsaWVudC9UcmVlL1RoZW1lcy91bWJyYWNvL3N0eWxlLmNzczsvdW1icmFjb19jbGllbnQvcGFuZWwvc3R5bGUuY3NzOy91bWJyYWNvX2NsaWVudC9zY3JvbGxpbmdtZW51L3N0eWxlLmNzczsvdW1icmFjb19jbGllbnQvbW9kYWwvc3R5bGUuY3NzOy91bWJyYWNvL2Nzcy91bWJyYWNvR3VpLmNzczs%3d&t=Css&cdv=1

    I can't find the file physically on the disc, and I have never seen this kind of weird behaviour before. How can I fix this, so that all the backend images are vissible again?

    By the way, I'm running Umbraco 4.5 on an IIS7

    Thanks!

    /Kim A

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Jul 30, 2010 @ 15:25
    Sebastiaan Janssen
    0

    Well, this might sound silly but I've had a lot of browser caching frustration lately: have you tried SHIFT+reload or CTRL+reload??

    If that works, have a look at what fiddler says, hopefully it will give you a lot of red errors to point you to the right direction.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 30, 2010 @ 15:38
    Kim Andersen
    0

    Hi Sebastiaan

    I tried clearing my cache in my browser, tried restarting my local machine, tried an IISRESET on the webserver, but none of it worked.

    I even tried loging into the backend from my iPhone with Wi-Fi turned off, so I used the 3G connection, but with the same result unfortunately :(

    /Kim A

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Jul 30, 2010 @ 15:47
    Sebastiaan Janssen
    0

    lol that's thorough! But please, have a look with Fiddler, it should give you a very fast indication of where the problem is.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 30, 2010 @ 15:57
    Kim Andersen
    0

    Yeah wanted to try almost everything before asking for help :)

    Fiddler just gives me a lot of red errors with an error 500. But it makes sense, because it tries to find the images at the old domain (http://new.domain.com) instead of the real domain (http://www.domain.com).

    I'm not quite sure what to look for in Fiddler other than the site tries to find the images at the wrong domain :S

    /Kim A

  • Dimitris Tsoukakis 33 posts 59 karma points
    Jul 30, 2010 @ 16:36
    Dimitris Tsoukakis
    2

    Remove the contents of App_Data/ClientDependency folder.

    Make a backup first. I tried it once and I didn't had any problem .. but you never know. 

    I had a problem with the tray too. I had had a custom section but my changes in the umbracoGui.css where not visible on my site. I deleted the contents and everything worked great after this.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 30, 2010 @ 16:41
    Kim Andersen
    0

    Wee Dimitris! You rock dude!

    I deleted all the files in the ClientDependency-folder, and now it works just like a charm. All of the images are vissible again.

    Thanks :)

    /Kim A

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Jul 30, 2010 @ 16:57
    Sebastiaan Janssen
    0

    That is annoying, I wonder if there's an easy way to clear the ClientDependency cache, else this will be a major deployment  (dev -> test -> staging -> production) headache.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 31, 2010 @ 22:14
    Kim Andersen
    0

    Sebastiaan, I just walked through some of the reported issues on Codeplex, and I found this one: Missing images in admin area, incorrect URL for images 4.5

    Maybe that is the issue to vote for in this situation. I'll write a comment on Codeplex reffering to this page.

    /Kim A

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Aug 03, 2010 @ 09:56
    Shannon Deminick
    2

    The solution is:

    DON'T deploy the ClientDependency folder between environments!

    The files inside of here are build dynamically which is why when Umbraco ships, this folder doesn't even exist. You can delete this folder anytime you like which will invalidate the persisted cache of the combined/compressed JavaScript & CSS files in the back office, and anything that you've registered with ClientDependency in your project.

    There's full documentation on this on the CodePlex site:

    http://clientdependency.codeplex.com/

     

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 03, 2010 @ 09:59
    Sebastiaan Janssen
    0

    Thanks Shannon, easy enough! :-)

    My other concern is with multisites. I have a few sites that run from one single Umbraco instance. Our editors have to log into different URL's http://abc.com/umbraco and http://def.com/umbraco.

    The cache is built the first time you log in and will refer to http://abc.com/. Then an editor logs into def.com. Do they see missing images?

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Aug 03, 2010 @ 10:04
    Shannon Deminick
    2

    They shouldn't because the domains will still resolve (however, they may see images coming from other domains). You can tweak ClientDependency a ton, so if you want you could:

    • disable persistence, this will be more CPU intensive and similar to IIS 7's dynamic compression but will not create files under the ClientDependency folder
    • or disable 'composite' files which will simply not combine, compress, cache JavaScript or CSS files. This will then be slower on the client side as it will require substantially larger downloads and number of requests.
    • or combination of both

    All of this is on the doco for ClientDependency: http://clientdependency.codeplex.com/documentation and can be done by just changing the config.

    The same principle for deployment of the umbraco config file & examine indexes goes for ClientDependency.... just don't deploy these between environments, or you'll end up with problems,.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 03, 2010 @ 10:10
    Sebastiaan Janssen
    0

    Of course! I didn't think of that, doesn't matter where the images come from. I hope there won't be any cross-site scripting (javascript) problems though..

Please Sign in or register to post replies

Write your reply to:

Draft