locked
Sharepoint modifies url in aspx and master pages after content database restore RRS feed

  • Question

  • We have restored the content database of our production site onto a test site to have content refreshed. We were surprised to see that many pages were not displaying correctly anymore on our test server. We found out that many links were altered in some ASPX and Master pages. Some urls were missing a trailing "/", some missing a starting "/" which caused resources (css and js files in occurrence) to be loaded from a relative location instead of absolute location. A url that appears like this in production

    <script type="text/javascript" src="/js/scripts.js?version=1"></script>
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    

     

    is replaced like this in our test environment (see missing beginning "/" and whole server name removed in second occurence)

    <script type="text/javascript" src="js/scripts.js?version=1"></script>
    
    <script type="text/javascript" src="/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    

    If I download the page to disk and open it in notepad I do see the page is different!?! If we manually fix the file and upload it back then changes are preserved. We did restore the database with stsadm and SQL Server backup/restore but both method yields the same odd behavior. We also restored the content database on another site on the same physical server as production and we saw again the same odd behavior.

    Both production and test web.config file are the same except some connection strings and other harmless app settings (I was suspecting a http module of some kind causing this trouble but it does not seem to be the case).

    Any idea or things to try?

    Thanks.

    Pascal

    Monday, April 11, 2011 4:39 PM

All replies

  • I don't have a solution, but just wanted to say I think we are experiencing the same exact thing. We are on MOSS 2007, but I have noticed this same behavior with our Google Translator widget that uses :

    <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

    but it changes to <script src="/translate_a/element.js?cb=googleTranslateElementInit"></script>

    Not sure how to stop this?

    Monday, May 9, 2011 8:28 PM
  • I am glad to see that I am not alone having this issue! I still don't have a resolution to this.
    Monday, May 9, 2011 8:33 PM