5 Replies Latest reply on Sep 30, 2008 2:41 AM by Engr96

    Formatting and Broken Image Links after Restoring Deleted Files

    Engr96
      The background to this problem is complicated, so I will try to simplify it as much as I can.

      Our site was created by an outside firm. I've been updating it using Dreamweaver CS3. Last week I was updating a page and got an error in Dreamweaver (I don't remember the error). At that point, I noticed that all of the files were missing from my site except the one I was working on. I exited and restarted DW hoping the files would show up. They didn't. When I tried to get back in DW it said there was an error and I needed to uninstall and resinstall DW. I called our developer and luckily they had backup files. They restored them immediately. I've since reinstalled DW. Losing the files is another issue and I'm not asking about that on this post.

      After the site was restored, the live site looks fine, but now the images on all the pages are broken in Design View. Also, Our site has a sidebar and then a wider main content area. Prior to the problem, in Design View, I was able to see the sidebar at the actual width. Now, it shows up as wide as the page in Design View and above the main content, but again, is fine on the live site. Also, when I copied a page and added new images, the new images look fine in Design View.

      It appears that I have some path issues, but I don't know how to restore them. Does it have something to do with restoring the site from backup? They used CSS throughout the site, and I think that somehow, Design View lost the link to the CSS style sheet (hence the problem I am having with the sidebar in Design View). I also think that is the reason that I have broken links for the images. By the way, all of the images are in the img folder, but when I click on the file folder to add an image, only the images I've loaded since the file restoration show up.

      Does this make any sense?
        • 1. Re: Formatting and Broken Image Links after Restoring Deleted   Files
          Level 7
          as a wild guess- do these broken images and css file links use Site Root
          relative paths? Do they start with a leading slash like this
          src="/folder/file.jpg" ?

          If yes- and those don't show in dreamweaver design view- then the site is
          probably defined to the wrong folder level.
          From Previous Postings-

          the local site folder should be the one that contains the "homepage" index
          files.

          the remote folder- if the files need to go into a subdirectory on the host
          such as www or public_html or htdocs for instance- use the "host directory"
          line to put in the name of the subfolder such as public_html

          when done- the "homepage" will be in the top level of the local and remote
          files list.

          If the images show in design view, but not when doing an F12 Preview in
          browser- go into dw preferences->Preview in Browser and put a checkmark in
          "preview using temp files"


          --
          Alan
          Adobe Community Expert, dreamweaver

          http://www.adobe.com/communities/experts/



          • 2. Re: Formatting and Broken Image Links after Restoring Deleted   Files
            Engr96 Level 1
            Thanks for the quick reply.

            Yes, the file links use site relative paths. By local site folder, if you mean on my hard drive, I don't save any of the files to my hard drive. I work on them all remotely--any changes I make are made to the live site. In reality, I copy the page to a different name on the remote server, make the changes and then overwrite the old page when I'm done. All of this is done on the remote server and not on my hard drive, so if anyone knew the copied page's name, they could see the page live.

            On the remote server, all of the site pages are in the root directory. Imagines are stored in the img directory one level above the site root.

            Did I answer your question?

            Also note that the site, before and after the site restoration, used site relative paths and had the same directory configuration. It worked fine in Design View before the site restoration. The only changes were the restoration of site from backup and reinstallation of DW.


            • 3. Re: Formatting and Broken Image Links after Restoring Deleted     Files
              Level 7


              > I work
              > on them all remotely--any changes I make are made to the live site.

              not a workflow i recommend.

              To confirm- the site's homepage is in the top level of the remote files?
              It isn't showing up as being inside a sub-folder named public_html or
              something else?

              Is the correct url entered into the url address line, first page of local
              site info?

              --
              Alan
              Adobe Community Expert, dreamweaver

              http://www.adobe.com/communities/experts/



              • 4. Formatting and Broken Image Links after Restoring Deleted Files
                Engr96 Level 1
                >To confirm- the site's homepage is in the top level of the remote files?
                All of the site's pages, including the home page, are in the root directory.

                >It isn't showing up as being inside a sub-folder named public_html or
                something else?
                No, there is no sub-folder named public_html or any new folders since the restoration.

                >Is the correct url entered into the url address line, first page of local
                site info?
                You may be onto something here, but I'm not sure where you mean. Do you mean in managing sites, URL prefix:? If so, yes, it is correct.
                • 5. Re: Formatting and Broken Image Links after Restoring Deleted Files
                  Engr96 Level 1
                  I'm still working on this. I discovered by accident, that if I open the image file, it will no longer show up as a broken image and appears within Design View. So, then, I opened the main css style sheet. That fixed my formating issue within Design View.

                  It's like DW doesn't recognize where the old files are, but sees the new ones. I know if I open all the images it will fix the broken image problem, however, I have a lot of images.

                  Is there a way of having DW look at the site and "see" all of the files?