4 Replies Latest reply on Feb 20, 2010 10:36 AM by gribblethwaite

    Template links are always local

    gribblethwaite

      Hi

       

      I am just converting from GoLive so please bear with me. I have a site that I used to be able to drop big collections of layers onto with multiple Flash items and background images. This doesn't seem possible in DW, o I have tried with a Template of the wole page. The pages work locally for preview, but once published, the background image links in the APs are all absolute pointers to locations on my hard disk. Any images on the page (not backgrounds) appear correctly - this is unsurprisingly doing my head in. Any page I create from the template fails, any page I create from a copy of my index page works. I created the template from a copy of the index page.

       

      www.smallsystems.co.uk/dw1 shows the index with a working banner at the top, either of the links (News or Doco) show broken pages. The source reveals the problem which I think is related to the fact that the background images are set in the <head> whereas other images are set in the <body> and templates don't seem to like <head> stuff.

       

      As an aside has anyone else noticed DW CS4 being pretty unstable under Windows 7, 32 bit?

       

      Any help would be hugely appreciated.

       

      Jeremy

        • 1. Re: Template links are always local
          John Waller Adobe Community Professional & MVP

          First question, have you defined your site in Dreamweaver?

          http://www.tutorialized.com/view/tutorial/Define-a-New-Site-in-Dreamweaver-CS4/43826

           

          Local hard drive references in code often suggest a site has not been defined.

           

          For me, DW CS4 in Win 7 32 bit is rock solid. No issues to date.

           

          Did you upgrade install Win 7 or clean install? or is it a new machine?

          • 2. Re: Template links are always local
            gribblethwaite Level 1

            Hi

            Thanks for replying. Yes, I have defined a site:

             

            Local:

            Name, Local root, no image folder, Links relative to Document, HTTP address, Cache enabled.

             

            Remote:

            FTP

            Maintain sync

             

            Testing:

            As remote.

             

            I looked at the tutorial link you sent, I didn't use the wizard, but used Advanced, maybe that was a mistake given my inexperience with DW???

             

            Regarding reliability, W7 was clean build with disk format on a new machine (delivered with XP about two months before W7 release).

             

            Jeremy

            • 3. Re: Template links are always local
              gribblethwaite Level 1

              This really does look like templates don't work properly if there are any dependencies in the head of the page. I can hardly believe this in a product like Dreamweaver, but in the body of the page image paths are handled correctly, in the head they contain the absolute path from the root of my C: drive - fine on my PC but useless when exported to the web! The template filess can be edited on my PC but as soon as I create a new page based on the template the paths get scrambled and I can't even look at the page in Dreamweaver properly. This failure takes two forms, either the background images are missing or I get a message about needing to download the latest version of the Flash player (there are two .SWFs of the page). I can't see a pattern telling me which of the two failures I will get.

               

              This is in the template:

              #apDiv1 {
              position:absolute;
              width:260px;
              height:60px;
              z-index:100;
              left: 170px;
              top: 10px;
              background-image: url(../images/headerslices/leftLogo.png);
              }

              It is turned into this in a new page:

              #apDiv1 {
              position:absolute;
              width:260px;
              height:60px;
              z-index:100;
              left: 170px;
              top: 10px;
              background-image: url(file:///C|/Users/jeremy gugenheim/Documents/Webs DW CS4/images/headerslices/leftLogo.png);
              }

              Any help would be appreciated, I am running out of days on the trial and while I am not really interested in moving from a product that works (GoLive) to one that clearly doesn't, I am under some pressure form a client who thinks that Dreamweaver is still the industry leader. Oh dear.

               

              <ostrich>It looks like the crashing of my PC is a well known but longtime unfixed bug in the remote viewer, so I'm not following that one up any more.</ostrich>

               

              Jeremy

              • 4. Re: Template links are always local
                gribblethwaite Level 1

                OK, Fixed it.

                 

                Two stage fix, neither part worked on its own.

                 

                1/ Created a copy of my site, deleted all DW files and directories, created new DW site using this copy.

                AND

                2/ Opened html file, saved as template, said NO to update links.

                 

                Now I can create new files based on the template and the images work.

                 

                If it takes me this long to fix every curious bit of DW behaviour it'll take 20 years to finish the site.

                 

                Adobe, rule 1 of good user design is "Never tell the user off, don't let him get into trouble in the first place". I would admit though in this case you didn't tell me off. You just did nothing at all except modify my page.