Copy link to clipboard
Copied
First off, I am using an older version (CS5) at the moment, but this issue has only come up recently.
I am coding emails, so all of my links are external, and my HTML files are standalone, and not part of a site. Therefore, I never use relative links, and the full URL is always in my code.
The problem:
My links come from an excel spreadsheet. I will copy and paste them into my Dreamweaver file, and the link will look correct (for example: <a href="https://www.mysite.com/offerid123" target="_blank">....</a>)
When I view the file in a browser or email proof, clicking the link will direct me to "file:///Users/username/Documents/2017/March/Campaign/filename/https://www.mysite.com/offerid123.html" instead of the URL.
There is nothing wrong with my a tag, nothing visibly different from the links that work and the links that do not. I have tried pasting my URL into TextEdit and then copying and pasting it into my code, which does not work. I have removed the hyperlinks from the excel files so that the cell contains only the text of the URL, and then copying and pasting it into my code, which does not work. The only thing that seems to work is pasting it into my address bar in Chrome, and then copying it back out and pasting it over every instance in my HTML file in Dreamweaver.
I do not know if this is an issue with dreamweaver or the excel files that I am receiving, but I am hoping that I can get some help.
Thanks!
Copy link to clipboard
Copied
Sounds like you're modifying a file in DW without having a Site Definition chosen from the dropdown menu in the Files window.
Those "file" paths are generally absolute paths to locations on your local machine's hard drive and will only work for that particular machine. Once you leave your development computer, the links will stop working because the same files don't exist at the same path on remote machines. DW is putting them in because it doesn't know any other way to allow you to work with files/links on your machine until you define a site.
Even if you're only creating html emails, DW still wants a site defined in order to manage your links correctly. Personally I create an html email site for any given client, work with local versions of all of the files involved, then as a final step before uploading to an email service, add in the absolute path to the remote files with a Find & Replace.
Copy link to clipboard
Copied
I don't have a site defined, but I haven't had to for years... it only recently stopped working.
Just in case I'm not being clear, I'm not putting the "file/" links into my code. I'm putting the full URL to an external site, starting with "http". For some reason, when copied from certain spreadsheets (and I haven't narrowed down why), clicking the link in my file when previewing the file in my browser (or anywhere else) will sometimes point to "file/.... /http://whatever_the_link..." and throws a 404, even on my own machine.
It's almost as if there is some sort of hidden markup that isn't even showing in my HTML, which is causing the link to behave incorrectly, that I can only get rid of by pasting it into my address bar, and then copying it again from there.... as you can imagine that is extremely tedious to do for every link, and when pasting it back into the code over the incorrect link, nothing changes in the code, but suddenly it works.
Copy link to clipboard
Copied
Are you working within a defined local site folder in DW?
Nancy
Copy link to clipboard
Copied
No, they are all (and have been) standalone HTML files for each email. So, for example, the only structure would be in my folders. A campaign folder that includes an image folder and the HTML file.
I do not intentionally point to ANYTHING local for links, and the URL will appear to be a complete URL pointing to a site, beginning with http (or https, but you get the idea).
So for example, I will have a link, say, a shopping site. The text of the merchant name will be hyperlinked, and the tag will be, for example:
<a href="http://www.merchantname.com" target="_blank">Super Cool Sale</a>
The URL will have been copied from a spreadsheet and pasted into place in each individual "a" tag, or pasted using Find and Replace. Now, when I open the file to test my links, clicking the hyperlinked text will throw a 404, and the address bar will say, "file:///Users/username/Documents/2017/March/Campaign/filename/http://merchantname.com".
The "fix" has been to simply copy, from the URL bar, the very end of it that includes the actual URL that I want, and paste it over the identical text in my HTML... so yes, it is pasting the exact same thing over my existing code, but now it will work.
So the mystery is why, if my code is:
<a href="http://www.merchantname.com" target="_blank">Super Cool Sale</a>
does clicking on the "Super Cool Sale" text try to link to a local file path that doesn't exist?
Nothing has changed about the way that I code, but I recently updated MS Office. I am assuming the issue stems from Excel, but I've been unable to narrow it down there, either. I'm unsure of why I can't just strip out whatever issue is happening by pasting these URLs from Excel into a text editor and THEN putting them into my code.
This also is not a consistent issue that happens with every URL, but it's impossible to figure out by looking at the code. It only comes out in testing.
Thanks!
Copy link to clipboard
Copied
sjx7890 wrote
Nothing has changed about the way that I code, but I recently updated MS Office. I am assuming the issue stems from Excel, but I've been unable to narrow it down there, either. I'm unsure of why I can't just strip out whatever issue is happening by pasting these URLs from Excel into a text editor and THEN putting them into my code.
test; if you copy the code from Excel into notepad (some other basic text software) and then into Dreamwaver does that remove the hidden codes?
Copy link to clipboard
Copied
I'm on a Mac so I've been using TextEdit to try this. It does not consistently work to remove it.
Copy link to clipboard
Copied
at that point (on one that tested bad) I would remove the copied code and type it into Dreamweaver by hand... if it still tests bad at that point then its nothing to do with Excel
Copy link to clipboard
Copied
Ussnorway​
So I went through with my links that were not working this morning, as an example, and tested them by pasting into TextEdit.
Pasting the individual link into TextEdit, then re-copying it from there and pasting it into Dreamweaver works.
HOWEVER, it does not work if I put the links in my code, and then, as a last step, copy and paste ALL of my code into TextEdit, and then copy and paste it back over the file. My thinking was that I could knock all of the issues out at once, and also a safe "last step" in case I missed anything. However, it looks like it only works if I do each link individually.
Copy link to clipboard
Copied
I'm not going to fight with your workflow except to say that DW is designed to work best when you put your project files into a local site folder. If all you're doing is HTML emails, consider defining a common site folder for all i.e. C:\html_emails\
Nancy
Copy link to clipboard
Copied
I'm not against trying it, I just haven't done so before, so I'd have to figure out how to set it up.
It also seems odd it would suddenly be an issue after several years.