7 Replies Latest reply on Aug 3, 2010 7:38 AM by MurraySummers

    copy / paste link breakage revisited

    Stillbaffled

      I'm giving Dreamweaver another try, CS5, after some years with Expression Web. 

       

      Spent the morning trying to figure out the cause of this problem, thought at first it was a bug but seems Adobe doesn't think so.

       

      The problem: copying a link from one page to another in a different folder breaks the link, the reason being that DW simply pastes the link in exactly the same form, failing to recalculate its position relative to the new page. Problem also for pasting of images, etc., between pages.

       

      Old complaint apparently; see for example, http://forums.adobe.com/message/800520 and http://forums.adobe.com/message/537014.

       

      Solutions offered in the above posts: 1. use site-relative links (may work for some) or 2. some now-ancient plug-in (doubtful). 3. Save the whole page in the new folder, before copying the links out of it (moderate waste of time).  4. Manually fix each link (big waste of time).

       

      Needless to say, this is particularly annoying for those of us accustomed to EW, which simply recalculates any copy/pasted link without breaking a sweat.  And has been doing so for ages. DW users unaware of this?

       

      Can't understand why Adobe doesn't fix this.  Clearly the code is already there, more or less, because when you actually move a page to a new folder the links are automatically recalculated. Unlikely Microsoft owns any sort of patent on this behavior. There might be some instance where someone doesn't want the link recalculated, but when would this be?

       

      Doesn't Adobe realize what a pain this is? Typically, when I add a new page to my web, I want to reference it in three or four pages, usually in more or less the same form. With EW it's simple: do it one time, then copy and paste the new section into the other pages.  With DW, I am forced to repeat most of the work in each page.

       

      Am I missing something here?

        • 1. Re: copy / paste link breakage revisited
          MurraySummers Level 8

          Am I missing something here?

           

          No, I don't think you are.  I will only say that having used DW since DW2, written several books about its use, and built a reasonable freelance business around it, I've never had occasion to copy a link from one page to another, but if I did I'd just use a root relative link which will absolutely fix the problem.

          • 2. Re: copy / paste link breakage revisited
            Stillbaffled Level 1

            Murray, thanks for your comment.  But isn't your reasoning rather circular?  Of course you never have occasion to copy a link from one page to another... because you use Dreamweaver, and it's a huge pain to do so. How could you have occasion to do it if the functionality is not there? If you really never use the same material on more than one page, or when you do so, it never contains hyperlinks, then you must have a very unusual business. As far as I can see, most web pages on the internet do use a lot of links, and they tend to be repeated in different places in a web site. Web designers may do lots of nifty things these days, but the original purpose of the web was actually to deal with hyperlinks, and for many of us, still is. And if I'm not mistaken, the original purpose of computers was to automate repetitive tasks.

             

            Switching to relative links doesn't seem to me a valid solution.  People should use relative links when they are appropriate for their projects, not because its a workaround for some missing feature in the software.  And relative links are clearly not appropriate for all cases.  In my case, they are totally useless because I need to use the local version of my website, and I need to use it in a browser, not in Dreamweaver.  If I use the site relative setting, the links in the local version do not function at all.

            • 3. Re: copy / paste link breakage revisited
              MurraySummers Level 8

              But isn't your reasoning rather circular?  Of course you never have occasion to copy a link from one page to another... because you use Dreamweaver, and it's a huge pain to do so.

               

              Not at all.  I wouldn't even have thought of it if I hadn't read your thread.  But as I said, I'm not sure I've ever encountered the need to do so.  Nevertheless, how can using a root relative link be called a huge pain?  Sorry - I don't buy it....

               

              If you really never use the same material on more than one page, or when you do so, it never contains hyperlinks, then you must have a very unusual business.

               

              Of course I do this.  It's in Server-side include files, and guess what - I always use root relative links in SSI files.

               

              But I can see that you are determined not to be convinced that root relative links is a simple solution.  That's your choice.

              • 4. Re: copy / paste link breakage revisited
                Stillbaffled Level 1

                No, I'm not determined not to try root relative links.  In fact, before I wrote my previous reply I switched over to them, tried a copy and paste, and, voila! my local web is now completely useless. As I tried to explain, I need to use the local files as well as the uploaded version of my site, for various reasons. Now there might be some way to set up something where I would actually "publish" my local files to a local web, but at present I have no need to do this as I don't use any forms or other functionality that actually requires a server.  And this is one reason why server side includes are not very attractive to me, although there are others, such as the fact that I often need slightly different versions of items that appear on multiple pages.  You can say my situation is somewhat unusual, but it is not my "choice" not to use root relative links.  They simply don't work in my case, and I think you will find many other cases where they are not usable for one reason or another.

                 

                I really don't see what the big deal is about acknowledging that link correction on copy / paste is a significant missing feature. It seems to me anyone who was not an Adobe programmer would recognize that being able to cut and paste linked material between pages would be useful functionality even if they themselves had not felt a deep urge to do so.  Looking at the DW preferences, there are any number of niggling little details that the program will happily change for you... there's even a section for Copy / Paste which has numerous options for filtering pasted material from other programs.  Would it be too much to ask for an option that allowed hyperlinks to be properly rerouted when pasting between pages in different folders? It seems to me if people would acknowledge that this is a potentially useful feature, one that is included in the rival program, and does make a serious difference to at least some users, Adobe might get around to doing something about it.

                • 5. Re: copy / paste link breakage revisited
                  MurraySummers Level 8

                  Whether you can use root relative links or not depends on how you have your site defined.  For me, my PHP sites are all defined with a testing server using virtual hosts.  In that case, with the virtual hosts, the root relative links are properly parsed and everything works fine.  If you are working in ordinary, static sites, and you enable Preview in Browser > Use Temp files to preview (PREFERENCES), your root relative links will also be properly resolved.  It's really pretty simple.

                  • 6. Re: copy / paste link breakage revisited
                    Stillbaffled Level 1

                    Sure, Murray, that sounds really simple to me. I'll just go ahead and set up testing servers with virtual hosts on the five different computers that I use, on which I occasionally need to have access to my local web.  Then I'll make sure I have DW installed on all of the machines, so that I can update my local web on the testing server each time I want to look at one of the files.  Hard to imagine why I ever thought it might be better to be able to cut and paste relative links.

                    • 7. Re: copy / paste link breakage revisited
                      MurraySummers Level 8

                      Now you have the right idea.